Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df46c844 authored by Tri Vo's avatar Tri Vo Committed by Maciej Żenczykowski
Browse files

ANDROID: xfrm: remove in_compat_syscall() checks



This hack is needed to run 32-bit userspace on 64-bit kernel.

Bug: 138147164
Test: kernel_net_tests
Signed-off-by: default avatarTri Vo <trong@google.com>
Change-Id: I083d32b45ca985cfadfe3ce57d253b63202befde
parent 42d42e8a
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -2091,11 +2091,6 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen
	struct xfrm_mgr *km;
	struct xfrm_mgr *km;
	struct xfrm_policy *pol = NULL;
	struct xfrm_policy *pol = NULL;


#ifdef CONFIG_COMPAT
	if (in_compat_syscall())
		return -EOPNOTSUPP;
#endif

	if (!optval && !optlen) {
	if (!optval && !optlen) {
		xfrm_sk_policy_insert(sk, XFRM_POLICY_IN, NULL);
		xfrm_sk_policy_insert(sk, XFRM_POLICY_IN, NULL);
		xfrm_sk_policy_insert(sk, XFRM_POLICY_OUT, NULL);
		xfrm_sk_policy_insert(sk, XFRM_POLICY_OUT, NULL);
+0 −5
Original line number Original line Diff line number Diff line
@@ -2633,11 +2633,6 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
	const struct xfrm_link *link;
	const struct xfrm_link *link;
	int type, err;
	int type, err;


#ifdef CONFIG_COMPAT
	if (in_compat_syscall())
		return -EOPNOTSUPP;
#endif

	type = nlh->nlmsg_type;
	type = nlh->nlmsg_type;
	if (type > XFRM_MSG_MAX)
	if (type > XFRM_MSG_MAX)
		return -EINVAL;
		return -EINVAL;