Re: [bpf PATCH 1/2] bpf: sockmap update rollback on error can incorrectly dec prog refcnt

2018-05-17 Thread Martin KaFai Lau
On Wed, May 16, 2018 at 02:46:51PM -0700, John Fastabend wrote: > If the user were to only attach one of the parse or verdict programs > then it is possible a subsequent sockmap update could incorrectly > decrement the refcnt on the program. This happens because in the > rollback logic, after an er

[bpf PATCH 1/2] bpf: sockmap update rollback on error can incorrectly dec prog refcnt

2018-05-16 Thread John Fastabend
If the user were to only attach one of the parse or verdict programs then it is possible a subsequent sockmap update could incorrectly decrement the refcnt on the program. This happens because in the rollback logic, after an error, we have to decrement the program reference count when its been incr