Re: [PATCH 7/7] mv user buffer copy access_ok test to block helper

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

 



michaelc@xxxxxxxxxxx wrote:
> +				if (!access_ok(read ?
> +					       VERIFY_WRITE : VERIFY_READ,
> +					       p, iov_len))
> +					return -EFAULT;
>  			}
>  
>  			copy_bytes = min(iov_len, bvec->bv_len - bvec_offset);
> -			if (bio_data_dir(head) == READ)
> +			if (read)
>  				ret = copy_to_user(p, addr, copy_bytes);
>  			else
>  				ret = copy_from_user(addr, p, copy_bytes);

Tomo notified me that copy_from/to_user does the access_ok test so this
patch is not needed.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux