net/xfrm_user: use in_compat_syscall to deny compat syscalls
authorAndy Lutomirski <luto@kernel.org>
Tue, 22 Mar 2016 21:25:10 +0000 (14:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:36:02 +0000 (15:36 -0700)
The code wants to prevent compat code from receiving messages.  Use
in_compat_syscall for this.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/xfrm/xfrm_user.c

index 805681a7d356a7f4984f5dcd30c666291d3ae59a..2cc7af858c6f2a599aac11926d018d937622b236 100644 (file)
@@ -2449,7 +2449,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
        int type, err;
 
 #ifdef CONFIG_COMPAT
-       if (is_compat_task())
+       if (in_compat_syscall())
                return -ENOTSUPP;
 #endif