Re: [bpf PATCH] bpf: sockmap missing NULL psock check

2018-01-04 Thread Daniel Borkmann
On 01/03/2018 04:47 AM, John Fastabend wrote: > Add psock NULL check to handle a racing sock event that can get the > sk_callback_lock before this case but after xchg happens causing the > refcnt to hit zero and sock user data (psock) to be null and queued > for garbage collection. > > Also add a

[bpf PATCH] bpf: sockmap missing NULL psock check

2018-01-02 Thread John Fastabend
Add psock NULL check to handle a racing sock event that can get the sk_callback_lock before this case but after xchg happens causing the refcnt to hit zero and sock user data (psock) to be null and queued for garbage collection. Also add a comment in the code because this is a bit subtle and not o