[parisc-linux] Unaligned handler broken (kernel BUG at mm/mmap.c:1991!)

Helge Deller deller at gmx.de
Wed Jun 20 15:09:39 MDT 2007


Hi Kyle,

On Wednesday 20 June 2007, Kyle McMartin wrote:
> On Mon, Jun 18, 2007 at 09:31:06PM +0200, Helge Deller wrote:
> > The following small test case - which is itself wrong - crashes 2.6.22-rc5 (32bit kernel) badly:
> > 
> > #include <stdio.h>
> > int main()
> > {
> >         int *ptr = (int *) 0xffffffff;
> >         printf("ptr=%x, val=%d\n", ptr, *ptr);
> > }
> > 
> 
> I have a fix for this, will post after rudimentary testing.

I remembered, that I saw similiar problems with the LTP testsuite last december.
It's in the archives as thread named "kernel BUG at mm/mmap.c:1990".

In the end Willy (and I think you as well!) helped me to track the problem down on IRC.
The final patch which solved this issue is this one, which we had in our old git tree, but which never made it upstream:
http://git.parisc-linux.org/?p=linux-2.6.git;a=commitdiff;h=0590a4f2beee1d489050cb0ca035294892a46a40

Helge

PS: I would surround the if-clause check with likely() today...



More information about the parisc-linux mailing list