Unaligned handler broken (kernel BUG at mm/mmap.c:1991!)
Quoted 9 lines · Helge Deller
The following small test case - which is itself wrong - crashes 2.6.22-rc5 (32bit kernel) badly:
#include <
stdio.h>
intmain(){ int *ptr = (int *) 0xffffffff; printf("ptr=%x, val=%d\n", ptr, *ptr); }
I have a fix for this, will post after rudimentary testing.
Cheers,
Kyle
Hi Kyle,
Quoted 11 lines · Kyle McMartin
Quoted 9 lines · Helge Deller
The following small test case - which is itself wrong - crashes 2.6.22-rc5 (32bit kernel) badly:
#include <
stdio.h>
intmain(){ int *ptr = (int *) 0xffffffff; printf("ptr=%x, val=%d\n", ptr, *ptr); }
Quoted 1 line
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...
_______________________________________________
parisc-linux mailing list [email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux