Re: ipc/msg.c "cleanup" breaks fakeroot on Alpha

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

 




On Sat, 4 Nov 2006, Ingo Molnar wrote:
> 
> * Falk Hueffner <[email protected]> wrote:
> 
> > -	struct msg_msg* volatile r_msg;
> > +	volatile struct msg_msg	*r_msg;
> >  };
> >  
> > breaks fakeroot on Alpha (variously hangs or oopses). Backing it out 
> > of 2.6.19-rc4 fixes the issue. Is it possible that this change (which 
> > clearly does change semantics) was made in error?
> 
> correct, it was an error, lets back it out.
> 
> Another interesting question is: what in the IPC code relies on the 
> volatility of this field, and shouldnt it be converted to explicit 
> barriers instead?

Absolutely. Anything that depends on "volatile" is broken by definition, 
since volatile does _not_ imply memory barriers, and while it may 
constrict the compiler in certain ways (and thus effectively make it work 
on things like x86 where the memory ordering is fairly easy to get to 
work), it is not going to do _anything_ on some other architectures, 
except just perhaps make a bug harder to trigger.

Falk - do you have a couple of the oopses (the more, the better: race 
conditions tend to have subtle oopses, and with more oopses it is easier 
to try to figure out the pattern) that you can point people at, so that we 
can get an idea of what's going on.

This looks like a classic case of "volatile is a sign of a bug".

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux