Subject: Re: vnode locking problem
To: Bill Sommerfeld <>
From: Chuck Silvers <>
List: tech-kern
Date: 03/24/1999 07:50:26
Bill Sommerfeld writes:
> Allowing a recursive lock here is also wrong, as the fault is
> presumably occurring in the middle of a copyout() in the middle of the
> outer VOP_READ(), and the vnode may not be in a state that reentering
> VOP_READ could possibly work..
> I think the right answer in the short term is to add a new flag bit to
> the lockmgr to indicate that locking against self is a non-fatal
> condition, and should just cause the lockmgr call to fail instead of a
> panic, and then pass that flag (and test for that error) in
> uvm_vnode.c. and return EDEADLK.
> This should be simple to add and test.  Comments?
> 				- Bill

that should do well enough for now.
it's certainly better than hanging or panicing.
when testing, you should try the write-into-mapping case as well
as the read-into-mapping case that I described in the PR.