Re: [PATCH 1/5] dasd: cleanup dasd_ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 12, 2006 at 06:38:55PM +0100, Christoph Hellwig wrote:
> @@ -480,68 +389,90 @@
>   * Set read only
>   */
>  static int
> -dasd_ioctl_set_ro(struct block_device *bdev, int no, long args)
> +dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp)
>  {
> -	struct dasd_device *device;
> -	int intval, rc;
> +	struct dasd_device *device =  bdev->bd_disk->private_data;
> +	int intval;
>  
>  	if (!capable(CAP_SYS_ADMIN))
>  		return -EACCES;
>  	if (bdev != bdev->bd_contains)
>  		// ro setting is not allowed for partitions
>  		return -EINVAL;
> -	if (get_user(intval, (int __user *) args))
> +	if (get_user(intval, (int *)argp))
>  		return -EFAULT;

I think this is another candidate for "int __user *".

Bastian

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux