Re: [PATCH] staging: lustre: return error if copy_to_user fails

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

 



On Thu, May 14, 2015 at 10:58:44AM +0000, Drokin, Oleg wrote:
> So I imagine the only case where this could fail is if we got a pointer to some read-only location
> (or there's somebody playing with mappings behind our back?) so it should be totally fine to
> do it the other way around:
> 
> rc = -EOVERFLOW;
> if (copy_to_user(lump, &lum, lum_size))
> 	rc = -EFAULT;
> 
> goto out_set;
> 

Let's just leave it as-is.  The original code is fine.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux