> On 10 Jun 2020, at 17:34, Visa Hankala <[email protected]> wrote: > > A while ago, finishdup() was changed to release fdplock before calling > closef() to avoid potential lock order problems in the file close path. > However, the dup* code can still invoke that path with fdplock held > through FRELE(). That is fixed by the diff below. > > (In principle, the FRELE(fp, p) could be eliminated by getting fp while > the file descriptor table is locked. As long as the lock is held, other > threads are unable to close the file descriptor and hence the temporary > file reference is unnecessary.) > > OK?
I agreed with your diff.
