Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 May 2004 13:13:01 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Brian Fundakowski Feldman <green@FreeBSD.org>
Cc:        Colin Percival <cperciva@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/kern kern_clock.c
Message-ID:  <200405031313.01274.jhb@FreeBSD.org>
In-Reply-To: <200405031510.i43FAced005343@green.homeunix.org>
References:  <200405031510.i43FAced005343@green.homeunix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 03 May 2004 11:10 am, Brian Fundakowski Feldman wrote:
> Colin Percival <cperciva@FreeBSD.org> wrote:
> > cperciva    2004/05/02 17:48:11 PDT
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/kern             kern_clock.c
> >   Log:
> >   Fix a race condition which could result in profprocs being decremented
> >   more than once if stopprofclock is called multiple times on the same
> >   process.
>
> FWIW, the sched_lock enclosing the p->p_flag modification seems pretty
> bogus.

Nope.  The P_PROFIL flag is protected by both the proc lock and sched_lock so 
that we can check the flag with just sched_lock held in clock interrupt 
handlers that can't acquire normal mutexes.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405031313.01274.jhb>