netfilter: switch nf_setsockopt to sockptr_t

Pass a sockptr_t to prepare for set_fs-less handling of the kernel
pointer from bpf-cgroup.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christoph Hellwig
2020-07-23 08:08:54 +02:00
committed by David S. Miller
parent ab214d1bf8
commit c2f12630c6
10 changed files with 68 additions and 66 deletions

View File

@@ -996,7 +996,8 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,
/* we need to exclude all possible ENOPROTOOPTs except default case */
if (err == -ENOPROTOOPT && optname != IPV6_IPSEC_POLICY &&
optname != IPV6_XFRM_POLICY)
err = nf_setsockopt(sk, PF_INET6, optname, optval, optlen);
err = nf_setsockopt(sk, PF_INET6, optname, USER_SOCKPTR(optval),
optlen);
#endif
return err;
}