Re: [bpf PATCH v3 3/4] bpf: sockhash fix omitted bucket lock in sock_close

2018-06-23 Thread Martin KaFai Lau
On Fri, Jun 22, 2018 at 08:21:44AM -0700, John Fastabend wrote: > First in tcp_close, reduce scope of sk_callback_lock() the lock is > only needed for protecting maps list the ingress and cork > lists are protected by sock lock. Having the lock in wider scope is > harmless but may confuse the

[bpf PATCH v3 3/4] bpf: sockhash fix omitted bucket lock in sock_close

2018-06-22 Thread John Fastabend
First in tcp_close, reduce scope of sk_callback_lock() the lock is only needed for protecting maps list the ingress and cork lists are protected by sock lock. Having the lock in wider scope is harmless but may confuse the reader who may infer it is in fact needed. Next, in sock_hash_delete_elem()