diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2014-02-03 13:51:14 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2014-02-03 13:51:14 -0500 |
commit | cc6c0f545b4cd49a35ed834cb0cde615e02cc015 (patch) | |
tree | 64329ebd05b334002b8a802f77a5bb1f1820966a | |
parent | 3dc83e2654d7c54349120df1e7de194a24447e43 (diff) | |
download | longterm-queue-2.6.34-cc6c0f545b4cd49a35ed834cb0cde615e02cc015.tar.gz |
add missing chunk to scsi sd patch found by reviewbot
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/queue/block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch b/queue/block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch index a04d1fd..7fe8341 100644 --- a/queue/block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch +++ b/queue/block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch @@ -1,4 +1,4 @@ -From 5b72f630f81333e943b4e1ff74da6cf76242b93d Mon Sep 17 00:00:00 2001 +From 6d2626ece99a02979b58885a883dbb8d286cf645 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini <pbonzini@redhat.com> Date: Thu, 12 Jan 2012 16:01:28 +0100 Subject: [PATCH] block: fail SCSI passthrough ioctls on partition devices @@ -36,13 +36,12 @@ Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [ Make it also print the command name when warning - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> - Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- block/scsi_ioctl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ - drivers/scsi/sd.c | 7 +++++-- + drivers/scsi/sd.c | 11 +++++++++-- include/linux/blkdev.h | 1 + - 3 files changed, 51 insertions(+), 2 deletions(-) + 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 57ac93754841..b661f8940ef5 100644 @@ -111,10 +110,21 @@ index 57ac93754841..b661f8940ef5 100644 } EXPORT_SYMBOL(scsi_cmd_blk_ioctl); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c -index 654e2674e7c3..8f2bbec58929 100644 +index 654e2674e7c3..1b543a229487 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c -@@ -1065,6 +1065,11 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, +@@ -886,6 +886,10 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, + SCSI_LOG_IOCTL(1, printk("sd_ioctl: disk=%s, cmd=0x%x\n", + disk->disk_name, cmd)); + ++ error = scsi_verify_blk_ioctl(bdev, cmd); ++ if (error < 0) ++ return error; ++ + /* + * If we are in the middle of error recovery, don't let anyone + * else try and use this device. Also, if error recovery fails, it +@@ -1065,6 +1069,11 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) { struct scsi_device *sdev = scsi_disk(bdev->bd_disk)->device; @@ -126,7 +136,7 @@ index 654e2674e7c3..8f2bbec58929 100644 /* * If we are in the middle of error recovery, don't let anyone -@@ -1076,8 +1081,6 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, +@@ -1076,8 +1085,6 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, return -ENODEV; if (sdev->host->hostt->compat_ioctl) { |