diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-01-13 11:52:38 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-17 13:38:49 -0500 |
commit | 9e2ab1fabdbd88669fdebd368fb5cda32ad5438d (patch) | |
tree | 8707b3baccb3814cc8038423157758930e3e06b3 /drivers/s390 | |
parent | 5a3fb3081a0166cdc5df0d9200234d09ad8d6083 (diff) |
[SCSI] zfcp: add missing compat ptr conversion
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_cfdc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index f932400e980a..0eb6eefd2c1a 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/miscdevice.h> | 14 | #include <linux/miscdevice.h> |
15 | #include <asm/compat.h> | ||
15 | #include <asm/ccwdev.h> | 16 | #include <asm/ccwdev.h> |
16 | #include "zfcp_def.h" | 17 | #include "zfcp_def.h" |
17 | #include "zfcp_ext.h" | 18 | #include "zfcp_ext.h" |
@@ -163,7 +164,7 @@ static void zfcp_cfdc_req_to_sense(struct zfcp_cfdc_data *data, | |||
163 | } | 164 | } |
164 | 165 | ||
165 | static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, | 166 | static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, |
166 | unsigned long buffer) | 167 | unsigned long arg) |
167 | { | 168 | { |
168 | struct zfcp_cfdc_data *data; | 169 | struct zfcp_cfdc_data *data; |
169 | struct zfcp_cfdc_data __user *data_user; | 170 | struct zfcp_cfdc_data __user *data_user; |
@@ -175,7 +176,11 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, | |||
175 | if (command != ZFCP_CFDC_IOC) | 176 | if (command != ZFCP_CFDC_IOC) |
176 | return -ENOTTY; | 177 | return -ENOTTY; |
177 | 178 | ||
178 | data_user = (void __user *) buffer; | 179 | if (is_compat_task()) |
180 | data_user = compat_ptr(arg); | ||
181 | else | ||
182 | data_user = (void __user *)arg; | ||
183 | |||
179 | if (!data_user) | 184 | if (!data_user) |
180 | return -EINVAL; | 185 | return -EINVAL; |
181 | 186 | ||