Re: [PATCH iproute2 master] bpf: Fix race condition with map pinning

2019-09-19 Thread Joe Stringer
On Thu, Sep 19, 2019 at 3:07 PM Joe Stringer wrote: > > If two processes attempt to invoke bpf_map_attach() at the same time, > then they will both create maps, then the first will successfully pin > the map to the filesystem and the second will not pin the map, but will > continue operating with

Re: [PATCH iproute2 master] bpf: Fix race condition with map pinning

2019-09-19 Thread Daniel Borkmann
On Thu, Sep 19, 2019 at 03:07:33PM -0700, Joe Stringer wrote: > If two processes attempt to invoke bpf_map_attach() at the same time, > then they will both create maps, then the first will successfully pin > the map to the filesystem and the second will not pin the map, but will > continue operatin

[PATCH iproute2 master] bpf: Fix race condition with map pinning

2019-09-19 Thread Joe Stringer
If two processes attempt to invoke bpf_map_attach() at the same time, then they will both create maps, then the first will successfully pin the map to the filesystem and the second will not pin the map, but will continue operating with a reference to its own copy of the map. As a result, the sharin