summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/irq.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2023-09-24 03:23:47 +0300
committerVinod Koul <vkoul@kernel.org>2023-09-28 10:55:41 +0300
commit555921feb2ac03d88647ccc62015e68f157c30a2 (patch)
treeebbce9354bef7fba1f6b271ccd2bfbd4da1eeabd /drivers/dma/idxd/irq.c
parentb1c50ac25425385b576dd58b7b38c1c5963dde85 (diff)
downloadlinux-555921feb2ac03d88647ccc62015e68f157c30a2.tar.xz
dmaengine: idxd: rate limit printk in misc interrupt thread
Add rate limit to the dev_warn() call in the misc interrupt thread. This limits dmesg getting spammed if a descriptor submitter is spamming bad descriptors with invalid completion records and resulting the errors being continuously reported by the misc interrupt handling thread. Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Lijun Pan <lijun.pan@intel.com> Link: https://lore.kernel.org/r/20230924002347.1117757-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/irq.c')
-rw-r--r--drivers/dma/idxd/irq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index b501320a9c7a..2183d7f9cdbd 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -434,8 +434,8 @@ irqreturn_t idxd_misc_thread(int vec, void *data)
val |= IDXD_INTC_ERR;
for (i = 0; i < 4; i++)
- dev_warn(dev, "err[%d]: %#16.16llx\n",
- i, idxd->sw_err.bits[i]);
+ dev_warn_ratelimited(dev, "err[%d]: %#16.16llx\n",
+ i, idxd->sw_err.bits[i]);
err = true;
}