Re: [PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-09 Thread John Fastabend
Alexei Starovoitov wrote: > On Tue, Jun 9, 2020 at 10:51 AM John Fastabend > wrote: > > > > Jakub Sitnicki wrote: > > > We can end up modifying the sockhash bucket list from two CPUs when a > > > sockhash is being destroyed (sock_hash_free) on one CPU, while a socket > > > that is in the sockhash

Re: [PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-09 Thread Alexei Starovoitov
On Tue, Jun 9, 2020 at 10:51 AM John Fastabend wrote: > > Jakub Sitnicki wrote: > > We can end up modifying the sockhash bucket list from two CPUs when a > > sockhash is being destroyed (sock_hash_free) on one CPU, while a socket > > that is in the sockhash is unlinking itself from it on another C

RE: [PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-09 Thread John Fastabend
Jakub Sitnicki wrote: > We can end up modifying the sockhash bucket list from two CPUs when a > sockhash is being destroyed (sock_hash_free) on one CPU, while a socket > that is in the sockhash is unlinking itself from it on another CPU > it (sock_hash_delete_from_link). > > This results in access

[PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-07 Thread Jakub Sitnicki
We can end up modifying the sockhash bucket list from two CPUs when a sockhash is being destroyed (sock_hash_free) on one CPU, while a socket that is in the sockhash is unlinking itself from it on another CPU it (sock_hash_delete_from_link). This results in accessing a list element that is in an u