mirror of
https://github.com/opnsense/src.git
synced 2026-05-04 17:05:14 -04:00
- Lock the clearing of v_data so it is safe to inspect it with the
interlock. Sponsored by: Isilon Systems, Inc.
This commit is contained in:
parent
23d15e852d
commit
ba73105324
1 changed files with 7 additions and 1 deletions
|
|
@ -627,12 +627,18 @@ null_reclaim(struct vop_reclaim_args *ap)
|
|||
struct vnode *lowervp = xp->null_lowervp;
|
||||
struct lock *vnlock;
|
||||
|
||||
/*
|
||||
* Use the interlock to protect the clearing of v_data to
|
||||
* prevent faults in null_lock().
|
||||
*/
|
||||
VI_LOCK(vp);
|
||||
vp->v_data = NULL;
|
||||
VI_UNLOCK(vp);
|
||||
if (lowervp) {
|
||||
null_hashrem(xp);
|
||||
vrele(lowervp);
|
||||
}
|
||||
|
||||
vp->v_data = NULL;
|
||||
vp->v_object = NULL;
|
||||
vnlock = vp->v_vnlock;
|
||||
vp->v_vnlock = &vp->v_lock;
|
||||
|
|
|
|||
Loading…
Reference in a new issue