]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
dm: eliminate potential source of excessive kernel log noise
authorMike Snitzer <snitzer@redhat.com>
Wed, 6 Jan 2021 23:19:05 +0000 (18:19 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Jan 2021 20:56:35 +0000 (15:56 -0500)
There wasn't ever a real need to log an error in the kernel log for
ioctls issued with insufficient permissions. Simply return an error
and if an admin/user is sufficiently motivated they can enable DM's
dynamic debugging to see an explanation for why the ioctls were
disallowed.

Reported-by: Nir Soffer <nsoffer@redhat.com>
Fixes: e980f62353c6 ("dm: don't allow ioctls to targets that don't map to whole devices")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c

index b3c3c8b4cb428f587dbe9840b276fdc14d8fd630..7bac564f3faa6e1b49899b72e1d5286efcff840b 100644 (file)
@@ -562,7 +562,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
                 * subset of the parent bdev; require extra privileges.
                 */
                if (!capable(CAP_SYS_RAWIO)) {
-                       DMWARN_LIMIT(
+                       DMDEBUG_LIMIT(
        "%s: sending ioctl %x to DM device without required privilege.",
                                current->comm, cmd);
                        r = -ENOIOCTLCMD;