From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Hamza Mahfooz <someguy@effective-light.com>,
Jeremy Linton <jeremy.linton@arm.com>,
Christoph Hellwig <hch@lst.de>, Sasha Levin <sashal@kernel.org>,
Christoph@vger.kernel.org, m.szyprowski@samsung.com,
iommu@lists.linux-foundation.org
Subject: [PATCH AUTOSEL 5.14 08/34] dma-debug: prevent an error message from causing runtime problems
Date: Wed, 22 Sep 2021 23:37:56 -0400 [thread overview]
Message-ID: <20210923033823.1420814-8-sashal@kernel.org> (raw)
In-Reply-To: <20210923033823.1420814-1-sashal@kernel.org>
From: Hamza Mahfooz <someguy@effective-light.com>
[ Upstream commit 510e1a724ab1bf38150be2c1acabb303f98d0047 ]
For some drivers, that use the DMA API. This error message can be reached
several millions of times per second, causing spam to the kernel's printk
buffer and bringing the CPU usage up to 100% (so, it should be rate
limited). However, since there is at least one driver that is in the
mainline and suffers from the error condition, it is more useful to
err_printk() here instead of just rate limiting the error message (in hopes
that it will make it easier for other drivers that suffer from this issue
to be spotted).
Link: https://lkml.kernel.org/r/fd67fbac-64bf-f0ea-01e1-5938ccfab9d0@arm.com
Reported-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Hamza Mahfooz <someguy@effective-light.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/dma/debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index f2faa13534e5..70519f67556f 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -567,7 +567,8 @@ static void add_dma_entry(struct dma_debug_entry *entry)
pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
global_disable = true;
} else if (rc == -EEXIST) {
- pr_err("cacheline tracking EEXIST, overlapping mappings aren't supported\n");
+ err_printk(entry->dev, entry,
+ "cacheline tracking EEXIST, overlapping mappings aren't supported\n");
}
}
--
2.30.2
prev parent reply other threads:[~2021-09-23 3:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 3:37 [PATCH AUTOSEL 5.14 01/34] ibmvnic: check failover_pending in login response Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 02/34] net: phylink: Update SFP selected interface on advertising changes Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 03/34] net: macb: fix use after free on rmmod Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 04/34] net: stmmac: allow CSR clock of 300MHz Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 05/34] blk-mq: avoid to iterate over stale request Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 06/34] m68k: Double cast io functions to unsigned long Sasha Levin
2021-09-23 3:37 ` [PATCH AUTOSEL 5.14 07/34] ipv6: delay fib6_sernum increase in fib6_add Sasha Levin
2021-09-23 3:37 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210923033823.1420814-8-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Christoph@vger.kernel.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=jeremy.linton@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=someguy@effective-light.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox