Subject: Re: VXLOCK race?
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-kern
Date: 05/09/1996 18:29:14
> I have been browsing through kern/vfs_subr.c trying to figure out
> what various things do.  One thing which is worrying me is the
> following:

> At the start of vgone()...
> [check VXLOCK, if set just sleep, then call vclean]
> and in vclean()...
> [check VXLOCK, panic if set, else set it]

> as far as I can see this is all at spl0 - I'm probably missing
> something important but this looks horribly like a potential race
> condition to me.

It's not a race unless interrupt code looks at and/or sets the VXLOCK
bit.  Remember, a process executing in the kernel cannot be interrupted
by anything but a hardware interrupt.

Mind you, I haven't checked - if any interrupt code _does_ use VXLOCK
bits, there probably _is_ a race.

					der Mouse