summaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-23 08:08:47 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-24 15:41:53 -0700
commitb1ea9ff6aff2deae84eccaf0a07cd14912669680 (patch)
tree1b4e6db9c617a49ab90bb26dcd3e3cbeb946f5ec /net/packet/af_packet.c
parentba423fdaa589d972473083defedf9e862626d268 (diff)
net: switch copy_bpf_fprog_from_user 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 'net/packet/af_packet.c')
-rw-r--r--net/packet/af_packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c240fb5de3f0..d8d4f78f78e4 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1536,7 +1536,7 @@ static void __fanout_set_data_bpf(struct packet_fanout *f, struct bpf_prog *new)
}
}
-static int fanout_set_data_cbpf(struct packet_sock *po, char __user *data,
+static int fanout_set_data_cbpf(struct packet_sock *po, sockptr_t data,
unsigned int len)
{
struct bpf_prog *new;
@@ -1584,7 +1584,7 @@ static int fanout_set_data(struct packet_sock *po, char __user *data,
{
switch (po->fanout->type) {
case PACKET_FANOUT_CBPF:
- return fanout_set_data_cbpf(po, data, len);
+ return fanout_set_data_cbpf(po, USER_SOCKPTR(data), len);
case PACKET_FANOUT_EBPF:
return fanout_set_data_ebpf(po, data, len);
default: