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

2019-09-24 Thread Stephen Hemminger
On Thu, 19 Sep 2019 19:04:47 -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 operating wit

[PATCHv2 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