X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fblock%2Fdasd_ioctl.c;h=8cbddce1f34494e71efa5d42e91f70f64e8edf69;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=3efdcad2592875cf33c898fdb15155159c2847d3;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9;p=linux-2.6.git diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 3efdcad25..8cbddce1f 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -120,7 +120,7 @@ static int dasd_ioctl_api_version(struct block_device *bdev, int no, long args) { int ver = DASD_API_VERSION; - return put_user(ver, (int *) args); + return put_user(ver, (int __user *) args); } /* @@ -305,7 +305,7 @@ dasd_ioctl_format(struct block_device *bdev, int no, long args) return -ENODEV; if (test_bit(DASD_FLAG_RO, &device->flags)) return -EROFS; - if (copy_from_user(&fdata, (void *) args, + if (copy_from_user(&fdata, (void __user *) args, sizeof (struct format_data_t))) return -EFAULT; if (bdev != bdev->bd_contains) { @@ -348,7 +348,7 @@ dasd_ioctl_read_profile(struct block_device *bdev, int no, long args) if (device == NULL) return -ENODEV; - if (copy_to_user((long *) args, (long *) &device->profile, + if (copy_to_user((long __user *) args, (long *) &device->profile, sizeof (struct dasd_profile_info_t))) return -EFAULT; return 0; @@ -441,9 +441,9 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); } - + rc = 0; - if (copy_to_user((long *) args, (long *) dasd_info, + if (copy_to_user((long __user *) args, (long *) dasd_info, ((no == (unsigned int) BIODASDINFO2) ? sizeof (struct dasd_information2_t) : sizeof (struct dasd_information_t)))) @@ -466,7 +466,7 @@ dasd_ioctl_set_ro(struct block_device *bdev, int no, long args) if (bdev != bdev->bd_contains) // ro setting is not allowed for partitions return -EINVAL; - if (get_user(intval, (int *) args)) + if (get_user(intval, (int __user *) args)) return -EFAULT; device = bdev->bd_disk->private_data; if (device == NULL) @@ -499,7 +499,7 @@ dasd_ioctl_getgeo(struct block_device *bdev, int no, long args) geo = (struct hd_geometry) {}; device->discipline->fill_geometry(device, &geo); geo.start = get_start_sect(bdev) >> device->s2b_shift; - if (copy_to_user((struct hd_geometry *) args, &geo, + if (copy_to_user((struct hd_geometry __user *) args, &geo, sizeof (struct hd_geometry))) return -EFAULT;