[Top] [All Lists]

Re: semaphore woes in 2.6, 32bit

To: Jun Sun <>
Subject: Re: semaphore woes in 2.6, 32bit
From: Geert Uytterhoeven <>
Date: Sun, 9 May 2004 11:09:29 +0200 (MEST)
Cc: Ralf Baechle <>, Linux/MIPS Development <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
On Sat, 8 May 2004, Jun Sun wrote:
> On Sat, May 08, 2004 at 09:18:22AM +0200, Ralf Baechle wrote:
> > On Fri, May 07, 2004 at 06:10:31PM -0700, Jun Sun wrote:
> >
> > > I got a bunch of segfaults which are due to HAS_LLSCD cpu operating
> > > on a semaphore which is aligned along 4-byte boundary instead of the
> > > desired 8-byte boundary.
> >
> > Dare to give a complete version number?  I've dumped 2.4 on all my systems
> > months ago and never have seen this problem except with slab debugging
> > enabled - but that side effect of slab debugging is known since years.
> >
> Kernel is yesterday's CVS. gcc is 3.3.1.  config is ddb5477.  No
> additional patch.  See below.
> In any case if you look at the uart code you should see there
> is a problem already.  'state' is allocated through kmalloc() which only
> gives 4-byte alignement.  The only puzzling thing is that why this
> did not show up before.  Maybe kmalloc() was giving 8-byte aligned block?

AFAIK, kmaloc() always[*] returns 8-byte (or higher, for archs that need it)
aligned blocks.

[*] But I did see reports of this being false if slab debugging was enabled.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>