Re: bpf(4): BIOCGRTIMEOUT, BIOCSRTIMEOUT: protect with bd_mtx

2020-12-11 Thread Claudio Jeker
On Thu, Dec 10, 2020 at 11:26:16AM -0600, Scott Cheloha wrote: > Hi, > > Before converting bpf(4) from using ticks to using real units of time > we need to serialize BIOCGRTIMEOUT and BIOCSRTIMEOUT. Neither > operation is atomic so we need to use the per-descriptor mutex when > reading or writing

bpf(4): BIOCGRTIMEOUT, BIOCSRTIMEOUT: protect with bd_mtx

2020-12-10 Thread Scott Cheloha
Hi, Before converting bpf(4) from using ticks to using real units of time we need to serialize BIOCGRTIMEOUT and BIOCSRTIMEOUT. Neither operation is atomic so we need to use the per-descriptor mutex when reading or writing the bd_rtout member. While here we can start annotating the locking for s