From: Dan Carpenter Date: Tue, 19 Oct 2010 05:56:24 +0000 (+0200) Subject: Staging: sst: dereferencing user pointers X-Git-Tag: v2.6.37-rc2~22^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b97eed201376db6c4487fc846022eb4ffa7e1f9;p=pandora-kernel.git Staging: sst: dereferencing user pointers This code dereferences user supplied pointers directly instead of doing a copy_from_user(). Some kernel configs put user and kernel memory in different address spaces so this code isn't portable. Also the user memory could be swapped out or in this case the pointer could just be NULL leading to an oops. Another thing is that it makes permission tests like this sort of meaningless. if (minor == STREAM_MODULE && rec_mute->stream_id == 0) { retval = -EPERM; break; } The user could set stream_id to 1 for the test and then change it later. Signed-off-by: Dan Carpenter Acked-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed