net/xfrm_user: use in_compat_syscall to deny compat syscalls

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>
This commit is contained in:
Andy Lutomirski 2016-03-22 14:25:10 -07:00 committed by Linus Torvalds
parent 96c0e0a908
commit 2bf8c47626

View 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