From 9e2ab1fabdbd88669fdebd368fb5cda32ad5438d Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 13 Jan 2010 17:52:38 +0100 Subject: [PATCH] [SCSI] zfcp: add missing compat ptr conversion Signed-off-by: Heiko Carstens Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_cfdc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index f932400e980..0eb6eefd2c1 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c @@ -12,6 +12,7 @@ #include #include +#include #include #include "zfcp_def.h" #include "zfcp_ext.h" @@ -163,7 +164,7 @@ static void zfcp_cfdc_req_to_sense(struct zfcp_cfdc_data *data, } static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, - unsigned long buffer) + unsigned long arg) { struct zfcp_cfdc_data *data; struct zfcp_cfdc_data __user *data_user; @@ -175,7 +176,11 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, if (command != ZFCP_CFDC_IOC) return -ENOTTY; - data_user = (void __user *) buffer; + if (is_compat_task()) + data_user = compat_ptr(arg); + else + data_user = (void __user *)arg; + if (!data_user) return -EINVAL; -- 2.39.3