diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index d869b1d92707..77bf4606ad65 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1886,8 +1886,10 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen struct xfrm_policy *pol = NULL; #ifdef CONFIG_COMPAT +#ifndef CONFIG_AMLOGIC_MODIFY if (in_compat_syscall()) return -EOPNOTSUPP; +#endif #endif if (!optval && !optlen) { diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 39200306eaab..a75f4f2415ef 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2501,8 +2501,10 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) int type, err; #ifdef CONFIG_COMPAT +#ifndef CONFIG_AMLOGIC_MODIFY if (in_compat_syscall()) return -EOPNOTSUPP; +#endif #endif type = nlh->nlmsg_type;