aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-01-13 14:44:29 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-13 14:44:44 -0500
commit880348653ec2eda81550a8aa37c2eb625922f695 (patch)
tree9997fdf7f92a98a12b3dfbbe5b06409175e056e0 /drivers/s390/block
parentbebf023d415fd8984994a596aaa83cd0a3046d0b (diff)
[S390] dasd: 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/block')
-rw-r--r--drivers/s390/block/dasd_ioctl.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 478bcdb90b6f..fc7b30b4a255 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -17,7 +17,7 @@
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/blkpg.h> 18#include <linux/blkpg.h>
19#include <linux/smp_lock.h> 19#include <linux/smp_lock.h>
20 20#include <asm/compat.h>
21#include <asm/ccwdev.h> 21#include <asm/ccwdev.h>
22#include <asm/cmb.h> 22#include <asm/cmb.h>
23#include <asm/uaccess.h> 23#include <asm/uaccess.h>
@@ -358,9 +358,8 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
358} 358}
359 359
360static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd, 360static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
361 unsigned long arg) 361 struct cmbdata __user *argp)
362{ 362{
363 struct cmbdata __user *argp = (void __user *) arg;
364 size_t size = _IOC_SIZE(cmd); 363 size_t size = _IOC_SIZE(cmd);
365 struct cmbdata data; 364 struct cmbdata data;
366 int ret; 365 int ret;
@@ -376,7 +375,12 @@ dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
376 unsigned int cmd, unsigned long arg) 375 unsigned int cmd, unsigned long arg)
377{ 376{
378 struct dasd_block *block = bdev->bd_disk->private_data; 377 struct dasd_block *block = bdev->bd_disk->private_data;
379 void __user *argp = (void __user *)arg; 378 void __user *argp;
379
380 if (is_compat_task())
381 argp = compat_ptr(arg);
382 else
383 argp = (void __user *)arg;
380 384
381 if (!block) 385 if (!block)
382 return -ENODEV; 386 return -ENODEV;
@@ -414,7 +418,7 @@ dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
414 case BIODASDCMFDISABLE: 418 case BIODASDCMFDISABLE:
415 return disable_cmf(block->base->cdev); 419 return disable_cmf(block->base->cdev);
416 case BIODASDREADALLCMB: 420 case BIODASDREADALLCMB:
417 return dasd_ioctl_readall_cmb(block, cmd, arg); 421 return dasd_ioctl_readall_cmb(block, cmd, argp);
418 default: 422 default:
419 /* if the discipline has an ioctl method try it. */ 423 /* if the discipline has an ioctl method try it. */
420 if (block->base->discipline->ioctl) { 424 if (block->base->discipline->ioctl) {