[PATCH] nvme: ratelimit the completion-path messages driven by device data
Keith Busch
kbusch at kernel.org
Tue Aug 11 10:06:58 PDT 2026
On Mon, Aug 10, 2026 at 06:02:58PM -0400, Chao Shi wrote:
> nvme_find_rq() and nvme_handle_cqe() print an unratelimited message for
> every completion queue entry whose command id does not resolve to an
> in-flight request. Both are reached from the completion interrupt path
> (nvme_irq() -> nvme_poll_cq() -> nvme_handle_cqe()) and the decision to
> print is made entirely from device-supplied data, so a controller that
> posts a stream of bogus command ids drives unbounded printk from hard
> interrupt context.
Yeah, if a controller is so badly malfunctioning that only garbage is
getting posted to the completion queues, then we don't really get any
more information by dumping every single instance compared to rate
limiting it. So applied to nvme-7.3, but with a minor fix to an overly
long line.
More information about the Linux-nvme
mailing list