diff options
author | Javier Martinez Canillas <martinez.javier@gmail.com> | 2011-01-25 00:46:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-04 21:01:02 (GMT) |
commit | 00719fab9f6eb90b9e427d1096ad540d51878661 (patch) | |
tree | 755bac969a46a635899d7133fa5f6782ad37e32c /arch/x86/boot/.gitignore | |
parent | c69ab1a2cfe5018cf7add67b278db9c744661f0f (diff) | |
download | linux-fsl-qoriq-00719fab9f6eb90b9e427d1096ad540d51878661.tar.xz |
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>
Diffstat (limited to 'arch/x86/boot/.gitignore')
0 files changed, 0 insertions, 0 deletions