Re: kmalloc zero size changes break i386

2007-07-20 Thread Pekka J Enberg
On Fri, 20 Jul 2007, Pekka J Enberg wrote: > There's some heavy-duty function inlining going on in__kmalloc so could > you please work out the exact location of the oops as described in > Documentation/BUG-HUNTING (look for the "use GDB to translate" part). And, of course, please check if a5c96d

Re: kmalloc zero size changes break i386

2007-07-20 Thread Pekka J Enberg
Hi Roland, On Thu, 19 Jul 2007, Roland Dreier wrote: > [ 1350.668590] Unable to handle kernel NULL pointer dereference at > 0028 RIP: > [ 1350.674068] [] __kmalloc+0x51/0xaf There's some heavy-duty function inlining going on in__kmalloc so could you please work out the exact locati

Re: kmalloc zero size changes break i386

2007-07-19 Thread Andi Kleen
On Thursday 19 July 2007 21:19:29 Linus Torvalds wrote: > > On Thu, 19 Jul 2007, Linus Torvalds wrote: > > > > Does something like this fix it? > > > > Christoph, please go over this and see if there are other cases like that. > > Actually, here's a better version, I think. > > Andi, does this

Re: kmalloc zero size changes break i386

2007-07-19 Thread Linus Torvalds
On Thu, 19 Jul 2007, Linus Torvalds wrote: > > Does something like this fix it? > > Christoph, please go over this and see if there are other cases like that. Actually, here's a better version, I think. Andi, does this patch fix your problem? Linus --- mm/slab.c |4 ++--

Re: kmalloc zero size changes break i386

2007-07-19 Thread Pekka Enberg
Linus Torvalds wrote: Ok, I think I see it: I think the mm/slab.c conversion of kmalloc(0) is totally broken. The problem? It returns ZERO_SIZE_PTR from __find_general_cachep(), not from __kmalloc(). So anythign that uses __find_general_cachep() will get an invalid cachep pointer, which was no

Re: kmalloc zero size changes break i386

2007-07-19 Thread Linus Torvalds
On Thu, 19 Jul 2007, Roland Dreier wrote: > > I think the oops below is related -- Michael reports that avoiding > kmalloc(0) in the mlx4_ib driver makes it go away. Ok, I think I see it: I think the mm/slab.c conversion of kmalloc(0) is totally broken. The problem? It returns ZERO_SIZE_PTR fro

Re: kmalloc zero size changes break i386

2007-07-19 Thread Andi Kleen
On Thursday 19 July 2007 16:08:34 Pekka Enberg wrote: > Hi Andi, > > On 7/19/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > > qemu testing and booting test machines with i386 kernels wasn't very > > successfull > > with recent git kernels. I got either BUGs because of failing sysfs > > initializati

Re: kmalloc zero size changes break i386

2007-07-19 Thread Linus Torvalds
On Thu, 19 Jul 2007, Andi Kleen wrote: > > qemu testing and booting test machines with i386 kernels wasn't very > successfull > with recent git kernels. I got either BUGs because of failing sysfs > initialization > or oopses in kmalloc, but no user land. Can you send in the oopses and BUGs? T

Re: kmalloc zero size changes break i386

2007-07-19 Thread Roland Dreier
I think the oops below is related -- Michael reports that avoiding kmalloc(0) in the mlx4_ib driver makes it go away. From: "Michael S. Tsirkin" <[EMAIL PROTECTED]> Subject: oops on mlx4 modprobe To: [EMAIL PROTECTED], Roland Dreier <[EMAIL PROTECTED]> Date: Thu, 19 Jul 2007 11:47:51 +0300 Reply-T

Re: kmalloc zero size changes break i386

2007-07-19 Thread Pekka Enberg
Hi Andi, On 7/19/07, Andi Kleen <[EMAIL PROTECTED]> wrote: qemu testing and booting test machines with i386 kernels wasn't very successfull with recent git kernels. I got either BUGs because of failing sysfs initialization or oopses in kmalloc, but no user land. I bisected it down to this comm

kmalloc zero size changes break i386

2007-07-19 Thread Andi Kleen
qemu testing and booting test machines with i386 kernels wasn't very successfull with recent git kernels. I got either BUGs because of failing sysfs initialization or oopses in kmalloc, but no user land. I bisected it down to this commit. To reproduce: try to boot a 386 defconfig kernel, compil