Skip to content

Commit

Permalink
dm: eliminate potential source of excessive kernel log noise
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: e980f62 ("dm: don't allow ioctls to targets that don't map to whole devices")
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
snitm committed Jan 8, 2021
1 parent fcc4233 commit 0378c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0378c62

Please sign in to comment.