HomeFreeBSD

Revised fix for locking violation when unionfs calls vput with
rS25261Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Revised fix for locking violation when unionfs calls vput with
UN_KLOCK flag.

When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear
UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock
clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not
access uppervp and does not clear UN_KLOCK, and (3) callers of
vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes:

SETKLOCK(union_node);
vput(vnode);
CLEARKLOCK(union_node);

where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears
UN_KLOCK.

Details

Provenance
katoAuthored on
Parents
rS25260: Merge in from -current: Put #define of CMD640 option into opt_wd.h
Branches
Unknown
Tags
Unknown

Event Timeline