diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 332dd00f0894..6d55b61bfa79 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -301,6 +301,12 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, | |||
301 | u32 data; | 301 | u32 data; |
302 | void __user *dxferp; | 302 | void __user *dxferp; |
303 | int err; | 303 | int err; |
304 | int interface_id; | ||
305 | |||
306 | if (get_user(interface_id, &sgio32->interface_id)) | ||
307 | return -EFAULT; | ||
308 | if (interface_id != 'S') | ||
309 | return sys_ioctl(fd, cmd, (unsigned long)sgio32); | ||
304 | 310 | ||
305 | if (get_user(iovec_count, &sgio32->iovec_count)) | 311 | if (get_user(iovec_count, &sgio32->iovec_count)) |
306 | return -EFAULT; | 312 | return -EFAULT; |
@@ -539,7 +545,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp) | |||
539 | kcmd = MTIOCPOS; | 545 | kcmd = MTIOCPOS; |
540 | karg = &pos; | 546 | karg = &pos; |
541 | break; | 547 | break; |
542 | case MTIOCGET32: | 548 | default: /* MTIOCGET32 */ |
543 | kcmd = MTIOCGET; | 549 | kcmd = MTIOCGET; |
544 | karg = &get; | 550 | karg = &get; |
545 | break; | 551 | break; |
@@ -657,7 +663,7 @@ static int raw_ioctl(unsigned fd, unsigned cmd, | |||
657 | 663 | ||
658 | switch (cmd) { | 664 | switch (cmd) { |
659 | case RAW_SETBIND: | 665 | case RAW_SETBIND: |
660 | case RAW_GETBIND: { | 666 | default: { /* RAW_GETBIND */ |
661 | struct raw_config_request req; | 667 | struct raw_config_request req; |
662 | mm_segment_t oldfs = get_fs(); | 668 | mm_segment_t oldfs = get_fs(); |
663 | 669 | ||
@@ -936,6 +942,7 @@ COMPATIBLE_IOCTL(TCSETSF) | |||
936 | COMPATIBLE_IOCTL(TIOCLINUX) | 942 | COMPATIBLE_IOCTL(TIOCLINUX) |
937 | COMPATIBLE_IOCTL(TIOCSBRK) | 943 | COMPATIBLE_IOCTL(TIOCSBRK) |
938 | COMPATIBLE_IOCTL(TIOCCBRK) | 944 | COMPATIBLE_IOCTL(TIOCCBRK) |
945 | COMPATIBLE_IOCTL(TIOCGSID) | ||
939 | COMPATIBLE_IOCTL(TIOCGICOUNT) | 946 | COMPATIBLE_IOCTL(TIOCGICOUNT) |
940 | /* Little t */ | 947 | /* Little t */ |
941 | COMPATIBLE_IOCTL(TIOCGETD) | 948 | COMPATIBLE_IOCTL(TIOCGETD) |
@@ -1005,6 +1012,9 @@ COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND) | |||
1005 | COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) | 1012 | COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) |
1006 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) | 1013 | COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) |
1007 | #endif | 1014 | #endif |
1015 | /* Big V (don't complain on serial console) */ | ||
1016 | IGNORE_IOCTL(VT_OPENQRY) | ||
1017 | IGNORE_IOCTL(VT_GETMODE) | ||
1008 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ | 1018 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ |
1009 | COMPATIBLE_IOCTL(RTC_AIE_ON) | 1019 | COMPATIBLE_IOCTL(RTC_AIE_ON) |
1010 | COMPATIBLE_IOCTL(RTC_AIE_OFF) | 1020 | COMPATIBLE_IOCTL(RTC_AIE_OFF) |
@@ -1035,6 +1045,8 @@ COMPATIBLE_IOCTL(FIOQSIZE) | |||
1035 | #ifdef CONFIG_BLOCK | 1045 | #ifdef CONFIG_BLOCK |
1036 | /* loop */ | 1046 | /* loop */ |
1037 | IGNORE_IOCTL(LOOP_CLR_FD) | 1047 | IGNORE_IOCTL(LOOP_CLR_FD) |
1048 | /* md calls this on random blockdevs */ | ||
1049 | IGNORE_IOCTL(RAID_VERSION) | ||
1038 | /* SG stuff */ | 1050 | /* SG stuff */ |
1039 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) | 1051 | COMPATIBLE_IOCTL(SG_SET_TIMEOUT) |
1040 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) | 1052 | COMPATIBLE_IOCTL(SG_GET_TIMEOUT) |