Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Tue, May 05, 2009 at 09:04:00PM +0000, Andrew Doran wrote:
> Hi Manuel,
> 
> On Tue, May 05, 2009 at 08:26:37PM +0000, Manuel Bouyer wrote:
> 
> > Module Name:        src
> > Committed By:       bouyer
> > Date:               Tue May  5 20:26:36 UTC 2009
> > 
> > Modified Files:
> >     src/sys/kern: kern_softint.c
> > 
> > Log Message:
> > Declare sh_flags volatile.
> > Without it, on ports where splhigh() is inline, the compiler will optimise
> > the second SOFTINT_PENDING test in softint_schedule(). A dissasembly
> > of softint_schedule() with and without the volatile sh_flags confirm this
> > on sparc.
> > Because of this there is a race that could lead to the softhand_t
> > being enqueued twice on si_q, leading to a corrupted queue and
> > some handler being SOFTINT_PENDING but never called.
> > 
> > Should fix PR kern/38637
> 
> Your change works around a bug with sparc64

it's sparc, not sparc64.

> or perhaps even gcc. Please
> address the root cause instead. Thanks.

I'll try to look at ports which have inline spl*() function and add missing
insn_barrier(). But it may not be before next week

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index