diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/scsi_ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 260fa80ef575..9a87daa6f4fb 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) | |||
721 | break; | 721 | break; |
722 | } | 722 | } |
723 | 723 | ||
724 | if (capable(CAP_SYS_RAWIO)) | ||
725 | return 0; | ||
726 | |||
724 | /* In particular, rule out all resets and host-specific ioctls. */ | 727 | /* In particular, rule out all resets and host-specific ioctls. */ |
725 | printk_ratelimited(KERN_WARNING | 728 | printk_ratelimited(KERN_WARNING |
726 | "%s: sending ioctl %x to a partition!\n", current->comm, cmd); | 729 | "%s: sending ioctl %x to a partition!\n", current->comm, cmd); |
727 | 730 | ||
728 | return capable(CAP_SYS_RAWIO) ? 0 : -ENOIOCTLCMD; | 731 | return -ENOIOCTLCMD; |
729 | } | 732 | } |
730 | EXPORT_SYMBOL(scsi_verify_blk_ioctl); | 733 | EXPORT_SYMBOL(scsi_verify_blk_ioctl); |
731 | 734 | ||