From: Nate Case Date: Mon, 12 May 2008 20:14:14 +0000 (+1000) Subject: [POWERPC] Fix uninitialized variable bug in copy_{to|from}_user X-Git-Tag: v2.6.26-rc3~24^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c8387afdc93f90bf0241411d44e011d8d5b76df;p=pandora-kernel.git [POWERPC] Fix uninitialized variable bug in copy_{to|from}_user Calls to copy_to_user() or copy_from_user() can fail when copying N bytes, where N is a constant less than 8, but not 1, 2, 4, or 8, because 'ret' is not initialized and is only set if the size is 1, 2, 4 or 8, but is tested after the switch statement for any constant size <= 8. This fixes it by initializing 'ret' to 1, causing the code to fall through to the __copy_tofrom_user call for sizes other than 1, 2, 4 or 8. Signed-off-by: Dave Scidmore Signed-off-by: Nate Case Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed