Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1109210imm; Wed, 1 Aug 2018 10:19:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEHbEq7POg9yvGupKEjAJUbE0j61xV9DYvQBo8MFLP5T0i5v2BDeoEwUf2SF5PTAYNGvHh X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr26082614plt.288.1533143978206; Wed, 01 Aug 2018 10:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533143978; cv=none; d=google.com; s=arc-20160816; b=wF5mFhrugTVi/RGIYZ1TFSu4Ae4kEnPvDjIWv1BZIWGMzS8yze8hC2Qt9w/YBA9S+4 C/MJOCtbLODr+H5xJruxy+5GdFps8ty72LwK+Hb4SaYvHWhZ5TGlmgIb/JBk2asGnvVS 8oDe6FEDODyHvmAjTaXLqRIqAovjqsn4M36qQEx+CAp518Krc8GaGN/sXELq9XpztS2T H1j8Z8ttLGYfGyJyR8UdFleiRyc/3aVbIV3P6RE5PRySXDSTr4xjmNLqBJgTxe42mxrr jpWaq/lqX07U08+ApWFa7gkBKutkrrJYEWGsCA36APAqOliQs9hdsOG9Zo3uwn9Y7W9C 2HbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=LiIiofgAWqJbmZQW60qjbETCJsAbM3PFZgIXSa+4pNk=; b=fK9RLqgeGJzK+LAlHVSkT9ZcyfLzmdw3SbjM2RzgqlalhfU12J0viaP9K5jsSCACHj DoJuQ1iey+3IY+ZRT9sZCDP6QaaDqycOL1j4pdWVo8GMAKsccv13rv186q0o4Fcj+iFm RzStjxLf/DdC3PKOw7A47Ksr9Hiwpe8xc9TN5vC3Vbqn8TMRfGDsRuQ7ZflIofmyvNCQ veV6vbv0eSgStHKwes47ZPsw8SNqx2wDrzS5ye75eECjZk/l+f56/gMDk9hikLHuqUHs gGJgxg7x8prvEs/BcdxsSmi5UQXZ5tltOkBm+KHDPX+Hra3pIck8CPDzvXSybnAMW727 05Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i38-v6si16018294pgm.394.2018.08.01.10.19.23; Wed, 01 Aug 2018 10:19:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404855AbeHATEo (ORCPT + 99 others); Wed, 1 Aug 2018 15:04:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46572 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403856AbeHATEn (ORCPT ); Wed, 1 Aug 2018 15:04:43 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4F3A6C96; Wed, 1 Aug 2018 17:18:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Sasha Levin Subject: [PATCH 4.14 125/246] ALSA: emu10k1: Rate-limit error messages about page errors Date: Wed, 1 Aug 2018 18:50:35 +0200 Message-Id: <20180801165017.709014335@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai [ Upstream commit 11d42c81036324697d367600bfc16f6dd37636fd ] The error messages at sanity checks of memory pages tend to repeat too many times once when it hits, and without the rate limit, it may flood and become unreadable. Replace such messages with the *_ratelimited() variant. Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1093027 Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/pci/emu10k1/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c @@ -237,13 +237,13 @@ __found_pages: static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr) { if (addr & ~emu->dma_mask) { - dev_err(emu->card->dev, + dev_err_ratelimited(emu->card->dev, "max memory size is 0x%lx (addr = 0x%lx)!!\n", emu->dma_mask, (unsigned long)addr); return 0; } if (addr & (EMUPAGESIZE-1)) { - dev_err(emu->card->dev, "page is not aligned\n"); + dev_err_ratelimited(emu->card->dev, "page is not aligned\n"); return 0; } return 1; @@ -334,7 +334,7 @@ snd_emu10k1_alloc_pages(struct snd_emu10 else addr = snd_pcm_sgbuf_get_addr(substream, ofs); if (! is_valid_page(emu, addr)) { - dev_err(emu->card->dev, + dev_err_ratelimited(emu->card->dev, "emu: failure page = %d\n", idx); mutex_unlock(&hdr->block_mutex); return NULL;