diff options
author | JP Abgrall <jpa@google.com> | 2012-04-24 21:45:20 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2012-04-24 21:45:20 -0700 |
commit | 10add970b62d2276541af9e5fb0581d6d8434db4 (patch) | |
tree | afd79e8507c5fa243c044a6963072b6a6d0f059b /drivers/scsi/sd.c | |
parent | 9cea9c804af57f8538dc910e24c407c81e496e51 (diff) | |
parent | 66510aa1148e3457e7d46e0a2582dac7c591b95d (diff) | |
download | kernel_samsung_crespo-10add970b62d2276541af9e5fb0581d6d8434db4.zip kernel_samsung_crespo-10add970b62d2276541af9e5fb0581d6d8434db4.tar.gz kernel_samsung_crespo-10add970b62d2276541af9e5fb0581d6d8434db4.tar.bz2 |
Merge remote-tracking branch 'common/android-3.0' into android-samsung-30-wip-mergedown
* common/android-3.0: (1178 commits)
cpufreq: interactive: remove unused target_validate_time_in_idle
cpufreq: interactive: Boost frequency on touchscreen input
cpufreq: Separate speed target revalidate time and initial set time
cpufreq: interactive: based hispeed bump on target freq, not actual
cpufreq: interactive: adjust code and documentation to match
cpufreq: interactive: configurable delay before raising above hispeed
sync: add poll support
sw_sync: add fill_driver_data support
sync: add ioctl to get fence data
sw_sync: add debug support
sync: add debugfs support
sync: add timestamps to sync_pts
sw_sync: add cpu based sync driver
sync: Add synchronization framework
Linux 3.0.28
Bluetooth: Fix l2cap conn failures for ssp devices
TOMOYO: Fix mount flags checking order.
iommu/amd: Make sure IOMMU interrupts are re-enabled on resume
cred: copy_process() should clear child->replacement_session_keyring
ASoC: ak4642: fixup: mute needs +1 step
...
Conflicts:
mm/compaction.c
Change-Id: I3dc59225d2435eddbed0c639155179e580891ac8
Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 953773c..7d8b5d8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1073,6 +1073,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 @@ -1095,7 +1099,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, error = scsi_ioctl(sdp, cmd, p); break; default: - error = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, p); + error = scsi_cmd_blk_ioctl(bdev, mode, cmd, p); if (error != -ENOTTY) break; error = scsi_ioctl(sdp, cmd, p); @@ -1265,6 +1269,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; + int ret; + + ret = scsi_verify_blk_ioctl(bdev, cmd); + if (ret < 0) + return -ENOIOCTLCMD; /* * If we are in the middle of error recovery, don't let anyone @@ -1276,8 +1285,6 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, return -ENODEV; if (sdev->host->hostt->compat_ioctl) { - int ret; - ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg); return ret; |