From: Dan Carpenter Date: Thu, 21 Oct 2010 05:46:58 +0000 (+0200) Subject: Staging: bcm: use get_user() to access user pointers X-Git-Tag: v2.6.37-rc2~22^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eccbf04a904fc99c54ab37c29a2a4dedcec66e33;p=pandora-kernel.git Staging: bcm: use get_user() to access user pointers This fixes some places that dereference user pointers directly instead of using get_user(). Please especially check my changes to IOCTL_BCM_GET_CURRENT_STATUS. The original code modified the struct which "arg" was pointing to. I think this was a bug in the original code and that we only wanted to write to the OutputBuffer. Also with the original code you could read as much memory as you wanted so I had to put a cap on OutputLength. The only value of OutputLength that makes sense is sizeof(LINK_STATE) so now if OutputLength is not sizeof(LINK_STATE) it returns -EINVAL. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed