]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
uaccess: fix parameters inversion for __copy_from_user_inatomic()
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Tue, 16 Sep 2008 01:04:26 +0000 (18:04 -0700)
committerIngo Molnar <mingo@elte.hu>
Tue, 16 Sep 2008 05:44:46 +0000 (07:44 +0200)
The following patch changes to use __copy_from_user_inatomic(),
but the passing parameters incorrect:

    x86: some lock annotations for user copy paths, v3

This fixes the netfilter crash reported by Steven Noonan.

Reported-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Tested-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/uaccess.h

index 2062293e57e6a26b2289211585dcf39c900e71c1..6b58367d145e8735eaebbf16bfec0733406389fb 100644 (file)
@@ -78,7 +78,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
                                                        \
                set_fs(KERNEL_DS);                      \
                pagefault_disable();                    \
-               ret = __copy_from_user_inatomic((__force typeof(retval) __user *)(addr), &(retval), sizeof(retval));            \
+               ret = __copy_from_user_inatomic(&(retval), (__force typeof(retval) __user *)(addr), sizeof(retval));            \
                pagefault_enable();                     \
                set_fs(old_fs);                         \
                ret;                                    \