Re: [PATCH] nfsd: Always lock state exclusively.

2016-06-09 Thread Jeff Layton
On Wed, 2016-06-08 at 22:55 -0400, Oleg Drokin wrote: > It used to be the case that state had an rwlock that was locked for write > by downgrades, but for read for upgrades (opens). Well, the problem is > if there are two competing opens for the same state, they step on > each other toes

Re: [PATCH] nfsd: Always lock state exclusively.

2016-06-09 Thread Jeff Layton
On Wed, 2016-06-08 at 22:55 -0400, Oleg Drokin wrote: > It used to be the case that state had an rwlock that was locked for write > by downgrades, but for read for upgrades (opens). Well, the problem is > if there are two competing opens for the same state, they step on > each other toes

[PATCH] nfsd: Always lock state exclusively.

2016-06-08 Thread Oleg Drokin
It used to be the case that state had an rwlock that was locked for write by downgrades, but for read for upgrades (opens). Well, the problem is if there are two competing opens for the same state, they step on each other toes potentially leading to leaking file descriptors from the state

[PATCH] nfsd: Always lock state exclusively.

2016-06-08 Thread Oleg Drokin
It used to be the case that state had an rwlock that was locked for write by downgrades, but for read for upgrades (opens). Well, the problem is if there are two competing opens for the same state, they step on each other toes potentially leading to leaking file descriptors from the state