aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 5819dc02a143..1c500c462225 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);