Staging: rspiusb: copy_to/from_user related fixes
authorvibi sreenivasan <vibi_sreenivasan@cms.com>
Thu, 4 Jun 2009 15:29:17 +0000 (20:59 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:54 +0000 (11:00 -0700)
commit7a80bfcd1f4bac61d586d3551f74215ff02e9cba
tree3afb5bda553dd061a612384ab3c6ea7bae471b27
parent8d2db5169d103d03646e7b7e93798739b2290d22
Staging: rspiusb: copy_to/from_user related fixes

The patch does copy_to/from_user related fixes

*) __copy_from/to_user is enough for user space data buffer checked by access_ok.
*) return -EFAULT if __copy_from/to_user fails.
*) Do not use memcpy to copy from user space.

Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rspiusb/rspiusb.c