mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
BACKPORT: 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. Change-Id: I6219be8f1f4ab48e0a23ccc1856f5ed3c8e89ce3 Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
578805b37a
commit
8e629db75c
4 changed files with 11 additions and 8 deletions
|
|
@ -1589,7 +1589,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;
|
||||
|
|
@ -1637,7 +1637,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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue