From: Yoshinori Sato Date: Thu, 13 Mar 2008 19:32:37 +0000 (-0700) Subject: h8300: fix recent uaccess breakage X-Git-Tag: v2.6.25-rc6~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12d48739d0b5d96efe6b7d26107f5572c6215f4a;p=pandora-kernel.git h8300: fix recent uaccess breakage Al Viro wrote: > > After that commit in asm-h8300/uaccess.h we have > > #define get_user(x, ptr) \ > ({ \ > int __gu_err = 0; \ > uint32_t __gu_val = 0; \ > ^^^^^^^^^^^^^^^^^ > switch (sizeof(*(ptr))) { \ > case 1: \ > case 2: \ > case 4: \ > __gu_val = *(ptr); \ > break; \ > case 8: \ > memcpy(&__gu_val, ptr, sizeof (*(ptr))); \ > ^^^^^^^^^^^^^^^^ > > which, of course, is FUBAR whenever we actually hit that case - memcpy of > 8 bytes into uint32_t is obviously wrong. Why don't we simply do Cc: Al Viro Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed