]> Git Repo - linux.git/commitdiff
compat: fix sys_fanotify_mark
authorHeiko Carstens <[email protected]>
Tue, 28 Jan 2014 01:07:19 +0000 (17:07 -0800)
committerLinus Torvalds <[email protected]>
Tue, 28 Jan 2014 05:02:40 +0000 (21:02 -0800)
Commit 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 <[email protected]>
Reported-by: Andreas Krebbel <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Acked-by: "David S. Miller" <[email protected]>
Acked-by: Al Viro <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: <[email protected]> [3.10+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/notify/fanotify/fanotify_user.c

index 57d7c083cb4b89c9c49858680a05e69c36b7ef09..1fd66abe574003cce8766e4533c1c42b27de4aff 100644 (file)
@@ -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);
 }
This page took 0.069069 seconds and 4 git commands to generate.