aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2008-10-31 17:39:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-12-04 04:22:55 -0500
commit1c925604e1038c7c65b91a92d14dc972b3a70a97 (patch)
tree5c4e2f24a7e972b053cd05a6c80dc319a35f6e9b /block
parent50c396d38c1a7f0c693579ec88cb4be3c0b0645e (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')
-rw-r--r--block/compat_ioctl.c23
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,
677 case DVD_WRITE_STRUCT: 677 case DVD_WRITE_STRUCT:
678 case DVD_AUTH: 678 case DVD_AUTH:
679 arg = (unsigned long)compat_ptr(arg); 679 arg = (unsigned long)compat_ptr(arg);
680 /* These intepret arg as an unsigned long, not as a pointer,
681 * so we must not do compat_ptr() conversion. */
682 case HDIO_SET_MULTCOUNT:
683 case HDIO_SET_UNMASKINTR:
684 case HDIO_SET_KEEPSETTINGS:
685 case HDIO_SET_32BIT:
686 case HDIO_SET_NOWERR:
687 case HDIO_SET_DMA:
688 case HDIO_SET_PIO_MODE:
689 case HDIO_SET_NICE:
690 case HDIO_SET_WCACHE:
691 case HDIO_SET_ACOUSTIC:
692 case HDIO_SET_BUSSTATE:
693 case HDIO_SET_ADDRESS:
694 case CDROMEJECT_SW:
695 case CDROM_SET_OPTIONS:
696 case CDROM_CLEAR_OPTIONS:
697 case CDROM_SELECT_SPEED:
698 case CDROM_SELECT_DISC:
699 case CDROM_MEDIA_CHANGED:
700 case CDROM_DRIVE_STATUS:
701 case CDROM_LOCKDOOR:
702 case CDROM_DEBUG:
680 break; 703 break;
681 default: 704 default:
682 /* unknown ioctl number */ 705 /* unknown ioctl number */