From: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Subject: compat: fix sys_fanotify_mark 91c2e0bcae72 ("unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE") added a new unified compat fanotify_mark syscall to be used by all architectures. Unfortunately the unified version merges the split mask parameter in a wrong way: the lower and higher word got swapped. This was discovered with glibc's tst-fanotify test case. Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Reported-by: Andreas Krebbel <krebbel@xxxxxxxxxxxxxxxxxx> Cc: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx> Acked-by: "David S. Miller" <davem@xxxxxxxxxxxxx> Acked-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> [3.10+] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/notify/fanotify/fanotify_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN fs/notify/fanotify/fanotify_user.c~compat-fix-sys_fanotify_mark fs/notify/fanotify/fanotify_user.c --- a/fs/notify/fanotify/fanotify_user.c~compat-fix-sys_fanotify_mark +++ a/fs/notify/fanotify/fanotify_user.c @@ -886,9 +886,9 @@ COMPAT_SYSCALL_DEFINE6(fanotify_mark, { return sys_fanotify_mark(fanotify_fd, flags, #ifdef __BIG_ENDIAN - ((__u64)mask1 << 32) | mask0, -#else ((__u64)mask0 << 32) | mask1, +#else + ((__u64)mask1 << 32) | mask0, #endif dfd, pathname); } _ -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html