diff options
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 5819dc02a143..1cca21aafaba 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/debug.h> | 23 | #include <asm/debug.h> |
24 | #include <asm/idals.h> | 24 | #include <asm/idals.h> |
25 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
26 | #include <asm/compat.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <asm/cio.h> | 29 | #include <asm/cio.h> |
@@ -2844,13 +2845,16 @@ static int dasd_symm_io(struct dasd_device *device, void __user *argp) | |||
2844 | rc = -EFAULT; | 2845 | rc = -EFAULT; |
2845 | if (copy_from_user(&usrparm, argp, sizeof(usrparm))) | 2846 | if (copy_from_user(&usrparm, argp, sizeof(usrparm))) |
2846 | goto out; | 2847 | goto out; |
2847 | #ifndef CONFIG_64BIT | 2848 | if (is_compat_task() || sizeof(long) == 4) { |
2848 | /* Make sure pointers are sane even on 31 bit. */ | 2849 | /* Make sure pointers are sane even on 31 bit. */ |
2849 | if ((usrparm.psf_data >> 32) != 0 || (usrparm.rssd_result >> 32) != 0) { | ||
2850 | rc = -EINVAL; | 2850 | rc = -EINVAL; |
2851 | goto out; | 2851 | if ((usrparm.psf_data >> 32) != 0) |
2852 | goto out; | ||
2853 | if ((usrparm.rssd_result >> 32) != 0) | ||
2854 | goto out; | ||
2855 | usrparm.psf_data &= 0x7fffffffULL; | ||
2856 | usrparm.rssd_result &= 0x7fffffffULL; | ||
2852 | } | 2857 | } |
2853 | #endif | ||
2854 | /* alloc I/O data area */ | 2858 | /* alloc I/O data area */ |
2855 | psf_data = kzalloc(usrparm.psf_data_len, GFP_KERNEL | GFP_DMA); | 2859 | psf_data = kzalloc(usrparm.psf_data_len, GFP_KERNEL | GFP_DMA); |
2856 | rssd_result = kzalloc(usrparm.rssd_result_len, GFP_KERNEL | GFP_DMA); | 2860 | rssd_result = kzalloc(usrparm.rssd_result_len, GFP_KERNEL | GFP_DMA); |
@@ -3029,7 +3033,7 @@ static void dasd_eckd_dump_sense_ccw(struct dasd_device *device, | |||
3029 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3033 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
3030 | " in req: %p CS: 0x%02X DS: 0x%02X CC: 0x%02X RC: %d\n", | 3034 | " in req: %p CS: 0x%02X DS: 0x%02X CC: 0x%02X RC: %d\n", |
3031 | req, scsw_cstat(&irb->scsw), scsw_dstat(&irb->scsw), | 3035 | req, scsw_cstat(&irb->scsw), scsw_dstat(&irb->scsw), |
3032 | scsw_cc(&irb->scsw), req->intrc); | 3036 | scsw_cc(&irb->scsw), req ? req->intrc : 0); |
3033 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3037 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
3034 | " device %s: Failing CCW: %p\n", | 3038 | " device %s: Failing CCW: %p\n", |
3035 | dev_name(&device->cdev->dev), | 3039 | dev_name(&device->cdev->dev), |