Re: [bpf PATCH 1/2] bpf: sockmap, error path can not release psock in multi-map case

2018-07-05 Thread John Fastabend
On 07/03/2018 07:40 AM, Daniel Borkmann wrote: > On 06/30/2018 03:51 PM, John Fastabend wrote: >> The current code, in the error path of sock_hash_ctx_update_elem, >> checks if the sock has a psock in the user data and if so decrements >> the reference count of the psock. However, if the error happ

Re: [bpf PATCH 1/2] bpf: sockmap, error path can not release psock in multi-map case

2018-07-03 Thread Daniel Borkmann
On 06/30/2018 03:51 PM, John Fastabend wrote: > The current code, in the error path of sock_hash_ctx_update_elem, > checks if the sock has a psock in the user data and if so decrements > the reference count of the psock. However, if the error happens early > in the error path we may have never incr

[bpf PATCH 1/2] bpf: sockmap, error path can not release psock in multi-map case

2018-06-30 Thread John Fastabend
The current code, in the error path of sock_hash_ctx_update_elem, checks if the sock has a psock in the user data and if so decrements the reference count of the psock. However, if the error happens early in the error path we may have never incremented the psock reference count and if the psock exi