diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-14 13:01:20 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-14 13:01:20 -0700 |
commit | 028c99fa912b4ad2174793da97694a9c4b2cd305 (patch) | |
tree | 43d8bcccc596a098f490c6e244fd0350750d7886 /net | |
parent | bab5c80b211035739997ebd361a679fa85b39465 (diff) | |
parent | cee271678d0e3177a25d0fcb2fa5e051d48e4262 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:
====================
pull-request: bpf 2018-10-14
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix xsk map update and delete operation to not call synchronize_net()
but to piggy back on SOCK_RCU_FREE for sockets instead as we are not
allowed to sleep under RCU, from Björn.
2) Do not change RLIMIT_MEMLOCK in reuseport_bpf selftest if the process
already has unlimited RLIMIT_MEMLOCK, from Eric.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/xdp/xsk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 4e937cd7c17d..661504042d30 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -744,6 +744,8 @@ static int xsk_create(struct net *net, struct socket *sock, int protocol, sk->sk_destruct = xsk_destruct; sk_refcnt_debug_inc(sk); + sock_set_flag(sk, SOCK_RCU_FREE); + xs = xdp_sk(sk); mutex_init(&xs->mutex); spin_lock_init(&xs->tx_completion_lock); |