]> git.karo-electronics.de Git - karo-tx-linux.git/commit
test: fix sparse warnings in user_copy tests
authorKees Cook <keescook@chromium.org>
Fri, 3 Jan 2014 03:10:16 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:16 +0000 (14:10 +1100)
commitad9e03afd40bc735d421428b92bd8a30e2ab1007
tree939a64ab3224cd62fc76c1629878bec3a468bac6
parenta4f0d1b9cddc52dcc8535889b987d6f52adc2e34
test: fix sparse warnings in user_copy tests

Sparse fix for "test: check copy_to/from_user boundary validation":

To keep sparse happy with the horrible things being done with the user
memory pointers, declare both __user and non-__user cases ahead of time to
avoid needing to do the casts later.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/test_user_copy.c