Page MenuHomeFreeBSD

vp_crossmp: weaken the assert and make it more precise
ClosedPublic

Authored by kib on Sun, Sep 6, 8:57 PM.
Tags
None
Referenced Files
F174107463: D59468.diff
Wed, Sep 30, 4:34 PM
Unknown Object (File)
Mon, Sep 28, 11:26 PM
Unknown Object (File)
Sat, Sep 26, 4:07 AM
Unknown Object (File)
Fri, Sep 25, 5:09 PM
Unknown Object (File)
Thu, Sep 24, 12:22 AM
Unknown Object (File)
Wed, Sep 23, 9:53 AM
Unknown Object (File)
Wed, Sep 23, 4:19 AM
Unknown Object (File)
Wed, Sep 23, 3:37 AM
Subscribers

Details

Summary

Since the vp_crossmp vnode can leak into vn_vptocnp() calls due to
nullfs file mounting, not all lock requests are non-sleeping. The
requirement for the crossmp locking is that all lock requests should be
shared. Then, it does not matter if the requests allow sleeping, since
all locks are shared.

Also, check the lock type by correctly masking it with LK_TYPE_MASK.

Reported and tested by: pho

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable