Javier Martinez Canillas 00719fab9f Staging: bcm: Check correct user provided length and fix error code returned
bcm driver copies a buffer length provided by userpace without checking it.

RxCntrlMsgBitMask is of type unsigned long so only makes sense to copy
sizeof(unsigned long) bytes.

Also, copy_from_user() returns the number of bytes that could not be copied.
The driver is returning that value as error code instead of -EFAULT.

This patch solves both issues.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:01:02 -08:00
..
2010-11-01 14:06:24 -04:00
2010-11-01 12:37:05 -04:00
2010-09-08 21:15:06 -07:00
2010-11-01 09:50:16 -04:00
2010-10-05 08:50:15 -07:00
2010-09-08 21:15:06 -07:00
2010-11-01 12:37:48 -04:00
2010-11-01 09:53:58 -04:00
2010-11-01 14:06:24 -04:00
2010-10-29 20:44:57 -07:00
2010-11-01 14:06:24 -04:00
2011-01-17 17:39:39 -08:00
2010-09-08 21:15:06 -07:00
2010-09-08 21:15:06 -07:00
2010-11-01 14:18:16 -04:00
2010-09-08 21:15:06 -07:00
2010-09-08 21:15:06 -07:00