net/xfrm: switch xfrm_user_policy 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:51 +02:00
committed by David S. Miller
parent c8c1bbb6eb
commit c6d1b26a8f
4 changed files with 12 additions and 8 deletions

View File

@@ -935,7 +935,8 @@ done:
retv = -EPERM;
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
break;
retv = xfrm_user_policy(sk, optname, optval, optlen);
retv = xfrm_user_policy(sk, optname, USER_SOCKPTR(optval),
optlen);
break;
case IPV6_ADDR_PREFERENCES: