Page MenuHomeFreeBSD

Fix double unlock if the source file disappears
ClosedPublic

Authored by trasz on Nov 23 2020, 1:58 PM.
Tags
None
Referenced Files
F169949492: D27339.diff
Thu, Sep 3, 1:52 AM
F169884721: D27339.id83193.diff
Wed, Sep 2, 9:24 PM
Unknown Object (File)
Wed, Sep 2, 3:12 PM
Unknown Object (File)
Tue, Sep 1, 8:22 PM
Unknown Object (File)
Tue, Sep 1, 1:32 AM
Unknown Object (File)
Mon, Aug 31, 7:52 PM
Unknown Object (File)
Mon, Aug 31, 10:25 AM
Unknown Object (File)
Sun, Aug 30, 1:51 PM
Subscribers

Details

Summary

Fix double unlock if the source file disappears; we would
unlock it here, only to unlock it again below, just before "bad".

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34981
Build 31974: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Nov 23 2020, 1:58 PM
sys/fs/msdosfs/msdosfs_vnops.c
1144

So why this vrele() uses a_vfp pointer instead of fvp ? Is it possible that they are different (doubt it). If so wouldn't it be more natural to stop these intermediate vrele/unlocks, replacing them by final vput(fvp) ?

sys/fs/msdosfs/msdosfs_vnops.c
1144

It is possible they are different - this code happens after a call to relookup(), which can change fvp. In fact, it has to be different, given the conditional ("xp != ip").

This revision is now accepted and ready to land.Dec 3 2020, 1:14 PM