]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: storvsc: Ratelimit warning logs to prevent VM denial of service
authorEaswar Hariharan <eahariha@linux.microsoft.com>
Tue, 7 Jan 2025 17:28:40 +0000 (17:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2025 17:24:01 +0000 (18:24 +0100)
commit81d4dd05c412ba04f9f6b85b718e6da833be290c
tree317e5073c07f47b2f20f167476ecdd17ed4a1059
parent6ac5dfa575136da8dd8a9e7c1437c41f3a593993
scsi: storvsc: Ratelimit warning logs to prevent VM denial of service

commit d2138eab8cde61e0e6f62d0713e45202e8457d6d upstream.

If there's a persistent error in the hypervisor, the SCSI warning for
failed I/O can flood the kernel log and max out CPU utilization,
preventing troubleshooting from the VM side. Ratelimit the warning so
it doesn't DoS the VM.

Closes: https://github.com/microsoft/WSL/issues/9173
Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250107-eahariha-ratelimit-storvsc-v1-1-7fc193d1f2b0@linux.microsoft.com
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/storvsc_drv.c