summaryrefslogtreecommitdiff
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-05 10:44:25 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-07-05 10:44:25 (GMT)
commitc90a9bb9073a4096596360f02ea711c619663494 (patch)
treedc85d9f4c0d423e6b523e81c41a5b68e267de14f /block/scsi_ioctl.c
parent23c342153ef2a4ad8bd4f2d6515126449658d2b3 (diff)
parent9e85a6f9dc231f3ed3c1dc1b12217505d970142a (diff)
downloadlinux-fsl-qoriq-c90a9bb9073a4096596360f02ea711c619663494.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 260fa80..9a87daa 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -721,11 +721,14 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
break;
}
+ if (capable(CAP_SYS_RAWIO))
+ return 0;
+
/* In particular, rule out all resets and host-specific ioctls. */
printk_ratelimited(KERN_WARNING
"%s: sending ioctl %x to a partition!\n", current->comm, cmd);
- return capable(CAP_SYS_RAWIO) ? 0 : -ENOIOCTLCMD;
+ return -ENOIOCTLCMD;
}
EXPORT_SYMBOL(scsi_verify_blk_ioctl);