Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm ioctl: rate limit a couple of ioctl based error messages

It is possible to spam the kernel log with a misbehaving user process that
is passing incorrect dm ioctls to /dev/mapper/control. Use a rate limit
on these error messages to reduce the noise.

These errors were hit when running the stress-ng's device test.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Colin Ian King and committed by
Mikulas Patocka
51f0659f b0e6210e

+2 -2
+2 -2
drivers/md/dm-ioctl.c
··· 1912 1912 1913 1913 if ((kernel_params->version[0] != DM_VERSION_MAJOR) || 1914 1914 (kernel_params->version[1] > DM_VERSION_MINOR)) { 1915 - DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)", 1915 + DMERR_LIMIT("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)", 1916 1916 DM_VERSION_MAJOR, DM_VERSION_MINOR, 1917 1917 DM_VERSION_PATCHLEVEL, 1918 1918 kernel_params->version[0], ··· 1961 1961 1962 1962 if (unlikely(param_kernel->data_size < minimum_data_size) || 1963 1963 unlikely(param_kernel->data_size > DM_MAX_TARGETS * DM_MAX_TARGET_PARAMS)) { 1964 - DMERR("Invalid data size in the ioctl structure: %u", 1964 + DMERR_LIMIT("Invalid data size in the ioctl structure: %u", 1965 1965 param_kernel->data_size); 1966 1966 return -EINVAL; 1967 1967 }