diff options
author | Andreas Schwab <schwab@suse.de> | 2008-10-31 22:39:46 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-04 04:22:55 -0500 |
commit | 1c925604e1038c7c65b91a92d14dc972b3a70a97 (patch) | |
tree | 5c4e2f24a7e972b053cd05a6c80dc319a35f6e9b /block/compat_ioctl.c | |
parent | 50c396d38c1a7f0c693579ec88cb4be3c0b0645e (diff) |
[PATCH] Fix block dev compat ioctl handling
Commit 33c2dca4957bd0da3e1af7b96d0758d97e708ef6 (trim file propagation
in block/compat_ioctl.c) removed the handling of some ioctls from
compat_blkdev_driver_ioctl. That caused them to be rejected as unknown
by the compat layer.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r-- | block/compat_ioctl.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index 3d3e7a46f38c..d43e6087badc 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c @@ -677,6 +677,29 @@ static int compat_blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode, case DVD_WRITE_STRUCT: case DVD_AUTH: arg = (unsigned long)compat_ptr(arg); + /* These intepret arg as an unsigned long, not as a pointer, + * so we must not do compat_ptr() conversion. */ + case HDIO_SET_MULTCOUNT: + case HDIO_SET_UNMASKINTR: + case HDIO_SET_KEEPSETTINGS: + case HDIO_SET_32BIT: + case HDIO_SET_NOWERR: + case HDIO_SET_DMA: + case HDIO_SET_PIO_MODE: + case HDIO_SET_NICE: + case HDIO_SET_WCACHE: + case HDIO_SET_ACOUSTIC: + case HDIO_SET_BUSSTATE: + case HDIO_SET_ADDRESS: + case CDROMEJECT_SW: + case CDROM_SET_OPTIONS: + case CDROM_CLEAR_OPTIONS: + case CDROM_SELECT_SPEED: + case CDROM_SELECT_DISC: + case CDROM_MEDIA_CHANGED: + case CDROM_DRIVE_STATUS: + case CDROM_LOCKDOOR: + case CDROM_DEBUG: break; default: /* unknown ioctl number */ |