Re: [PATCH v2 1/6] locks: fix unlock when fcntl_setlk races with a close

From: J. Bruce Fields
Date: Fri Jan 08 2016 - 11:26:09 EST


On Fri, Jan 08, 2016 at 11:22:04AM -0500, J. Bruce Fields wrote:
> On Fri, Jan 08, 2016 at 11:21:01AM -0500, J. Bruce Fields wrote:
> > Yeah. I almost think an OK iterim solution would be just to document
> > the race in the appropriate man page and tell people that if they really
> > want to use posix locks in an application with lots of threads sharing
> > file descriptors then they should consider OFD locks.
>
> (Especially if this race has always existed.)

Oh but note I'm only talking about this additional race that you've
identified.

I agree that the problem addressed by these patches need fixing, and
gave them a quick read and they look OK to me--feel free to add my ACK.

--b.