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
F171044964: D59468.diff
Tue, Sep 8, 9:14 AM
F170913753: D59468.diff
Mon, Sep 7, 1:19 PM
Unknown Object (File)
Mon, Sep 7, 5:56 AM
Unknown Object (File)
Mon, Sep 7, 5:55 AM
Unknown Object (File)
Mon, Sep 7, 2:56 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