diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-01-13 14:44:30 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-01-13 14:44:44 -0500 |
commit | 44ee6a8564a89a77206b0b13cea91fc2f4ff997d (patch) | |
tree | 6c51fbc22f1c1379eda38fcdd048e90c30a4bcdf /drivers/s390 | |
parent | 880348653ec2eda81550a8aa37c2eb625922f695 (diff) |
[S390] cio: add missing compat ptr conversion
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/chsc_sch.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index cc5144b6f9d9..c84ac9443079 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/miscdevice.h> | 13 | #include <linux/miscdevice.h> |
14 | 14 | ||
15 | #include <asm/compat.h> | ||
15 | #include <asm/cio.h> | 16 | #include <asm/cio.h> |
16 | #include <asm/chsc.h> | 17 | #include <asm/chsc.h> |
17 | #include <asm/isc.h> | 18 | #include <asm/isc.h> |
@@ -770,24 +771,30 @@ out_free: | |||
770 | static long chsc_ioctl(struct file *filp, unsigned int cmd, | 771 | static long chsc_ioctl(struct file *filp, unsigned int cmd, |
771 | unsigned long arg) | 772 | unsigned long arg) |
772 | { | 773 | { |
774 | void __user *argp; | ||
775 | |||
773 | CHSC_MSG(2, "chsc_ioctl called, cmd=%x\n", cmd); | 776 | CHSC_MSG(2, "chsc_ioctl called, cmd=%x\n", cmd); |
777 | if (is_compat_task()) | ||
778 | argp = compat_ptr(arg); | ||
779 | else | ||
780 | argp = (void __user *)arg; | ||
774 | switch (cmd) { | 781 | switch (cmd) { |
775 | case CHSC_START: | 782 | case CHSC_START: |
776 | return chsc_ioctl_start((void __user *)arg); | 783 | return chsc_ioctl_start(argp); |
777 | case CHSC_INFO_CHANNEL_PATH: | 784 | case CHSC_INFO_CHANNEL_PATH: |
778 | return chsc_ioctl_info_channel_path((void __user *)arg); | 785 | return chsc_ioctl_info_channel_path(argp); |
779 | case CHSC_INFO_CU: | 786 | case CHSC_INFO_CU: |
780 | return chsc_ioctl_info_cu((void __user *)arg); | 787 | return chsc_ioctl_info_cu(argp); |
781 | case CHSC_INFO_SCH_CU: | 788 | case CHSC_INFO_SCH_CU: |
782 | return chsc_ioctl_info_sch_cu((void __user *)arg); | 789 | return chsc_ioctl_info_sch_cu(argp); |
783 | case CHSC_INFO_CI: | 790 | case CHSC_INFO_CI: |
784 | return chsc_ioctl_conf_info((void __user *)arg); | 791 | return chsc_ioctl_conf_info(argp); |
785 | case CHSC_INFO_CCL: | 792 | case CHSC_INFO_CCL: |
786 | return chsc_ioctl_conf_comp_list((void __user *)arg); | 793 | return chsc_ioctl_conf_comp_list(argp); |
787 | case CHSC_INFO_CPD: | 794 | case CHSC_INFO_CPD: |
788 | return chsc_ioctl_chpd((void __user *)arg); | 795 | return chsc_ioctl_chpd(argp); |
789 | case CHSC_INFO_DCAL: | 796 | case CHSC_INFO_DCAL: |
790 | return chsc_ioctl_dcal((void __user *)arg); | 797 | return chsc_ioctl_dcal(argp); |
791 | default: /* unknown ioctl number */ | 798 | default: /* unknown ioctl number */ |
792 | return -ENOIOCTLCMD; | 799 | return -ENOIOCTLCMD; |
793 | } | 800 | } |