Skip to content

Commit

Permalink
net/xfrm_user: Use in_compat_syscall to deny compat syscalls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
amluto authored and sfrothwell committed Jan 28, 2016
1 parent 6a55fd4 commit be2d1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit be2d1d5

Please sign in to comment.