summaryrefslogtreecommitdiff
path: root/include/linux/mroute.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-23 09:08:56 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-25 01:41:54 +0300
commit01ccb5b48f08f59ca3746d59221f4990aec1b194 (patch)
tree4f1958c7573b7bb9293b79160a99bfa3a0a1639d /include/linux/mroute.h
parentb03afaa82ece13b2a008f0e3a7127bead578e3e6 (diff)
downloadlinux-01ccb5b48f08f59ca3746d59221f4990aec1b194.tar.xz
net/ipv4: switch ip_mroute_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>
Diffstat (limited to 'include/linux/mroute.h')
-rw-r--r--include/linux/mroute.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 9a36fad9e068..6cbbfe94348c 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -8,6 +8,7 @@
#include <net/fib_notifier.h>
#include <uapi/linux/mroute.h>
#include <linux/mroute_base.h>
+#include <linux/sockptr.h>
#ifdef CONFIG_IP_MROUTE
static inline int ip_mroute_opt(int opt)
@@ -15,7 +16,7 @@ static inline int ip_mroute_opt(int opt)
return opt >= MRT_BASE && opt <= MRT_MAX;
}
-int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
+int ip_mroute_setsockopt(struct sock *, int, sockptr_t, unsigned int);
int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
@@ -23,7 +24,7 @@ int ip_mr_init(void);
bool ipmr_rule_default(const struct fib_rule *rule);
#else
static inline int ip_mroute_setsockopt(struct sock *sock, int optname,
- char __user *optval, unsigned int optlen)
+ sockptr_t optval, unsigned int optlen)
{
return -ENOPROTOOPT;
}