linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] linux-2.6.22-rc2. SLUB report[kzalloc(0)]
@ 2007-05-21  2:05 Dan Kruchinin
  2007-05-21  8:30 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Kruchinin @ 2007-05-21  2:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-usb-devel

Hi.

There is a BUG message from SLUB during boot process:
--
May 21 05:39:10 midgard kernel: [   31.177484] BUG: at
include/linux/slub_def.h:77 kmalloc_index()
May 21 05:39:10 midgard kernel: [   31.178355]  [<c01062ca>]
show_trace_log_lvl+0x1a/0x30
May 21 05:39:10 midgard kernel: [   31.179263]  [<c0106e72>] show_trace
+0x12/0x20
May 21 05:39:10 midgard kernel: [   31.180177]  [<c0106ee6>] dump_stack
+0x16/0x20
May 21 05:39:10 midgard kernel: [   31.181094]  [<c018440d>] get_slab
+0x1cd/0x260
May 21 05:39:10 midgard kernel: [   31.182024]  [<c0185809>]
__kmalloc_track_caller+0x19/0xa0
May 21 05:39:10 midgard kernel: [   31.183019]  [<c0170059>] __kzalloc
+0x19/0x50
May 21 05:39:10 midgard kernel: [   31.184012]  [<df05586e>]
usb_get_configuration+0x9de/0x11c0 [usbcore]
May 21 05:39:10 midgard kernel: [   31.185115]  [<df04cd07>]
usb_new_device+0x17/0x190 [usbcore]
May 21 05:39:10 midgard kernel: [   31.186181]  [<df04e68a>] hub_thread
+0x79a/0xfd0 [usbcore]
May 21 05:39:10 midgard kernel: [   31.187185]  [<c013b8e2>] kthread
+0x42/0x70
May 21 05:39:10 midgard kernel: [   31.188190]  [<c0105ea7>]
kernel_thread_helper+0x7/0x10
--

kzalloc(0, GFP_KERNEL) occurs in drivers/usb/core/config.c in 
usb_get_configuration function. I already wrote about this slub bug
report and offered a
patch(http://www.uwsg.iu.edu/hypermail/linux/kernel/0705.1/0154.html). I
don't know, may be it is not major thing, if it is, just ignore it. I
just think, that 
--
	length = ncfg * sizeof(struct usb_host_config);
	dev->config = kzalloc(length, GFP_KERNEL);
--
isn't clear, because ncfg - in my case - is 0 and I suppose, that size
of the leastest slab cache can become(in future) smaller than
sizeof(struct usb_host_config).

Thanks for attention.

-- 
Dan Kruchinin <dubalom@gmail.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] linux-2.6.22-rc2. SLUB report[kzalloc(0)]
  2007-05-21  2:05 [RFC] linux-2.6.22-rc2. SLUB report[kzalloc(0)] Dan Kruchinin
@ 2007-05-21  8:30 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2007-05-21  8:30 UTC (permalink / raw)
  To: Dan Kruchinin; +Cc: linux-kernel, linux-usb-devel

Dan Kruchinin napsal(a):
> Hi.
> 
> There is a BUG message from SLUB during boot process:
> --
> May 21 05:39:10 midgard kernel: [   31.177484] BUG: at
> include/linux/slub_def.h:77 kmalloc_index()
> May 21 05:39:10 midgard kernel: [   31.178355]  [<c01062ca>]
> show_trace_log_lvl+0x1a/0x30
> May 21 05:39:10 midgard kernel: [   31.179263]  [<c0106e72>] show_trace
> +0x12/0x20
> May 21 05:39:10 midgard kernel: [   31.180177]  [<c0106ee6>] dump_stack
> +0x16/0x20
> May 21 05:39:10 midgard kernel: [   31.181094]  [<c018440d>] get_slab
> +0x1cd/0x260
> May 21 05:39:10 midgard kernel: [   31.182024]  [<c0185809>]
> __kmalloc_track_caller+0x19/0xa0
> May 21 05:39:10 midgard kernel: [   31.183019]  [<c0170059>] __kzalloc
> +0x19/0x50
> May 21 05:39:10 midgard kernel: [   31.184012]  [<df05586e>]
> usb_get_configuration+0x9de/0x11c0 [usbcore]
> May 21 05:39:10 midgard kernel: [   31.185115]  [<df04cd07>]
> usb_new_device+0x17/0x190 [usbcore]
> May 21 05:39:10 midgard kernel: [   31.186181]  [<df04e68a>] hub_thread
> +0x79a/0xfd0 [usbcore]
> May 21 05:39:10 midgard kernel: [   31.187185]  [<c013b8e2>] kthread
> +0x42/0x70
> May 21 05:39:10 midgard kernel: [   31.188190]  [<c0105ea7>]
> kernel_thread_helper+0x7/0x10
> --
> 
> kzalloc(0, GFP_KERNEL) occurs in drivers/usb/core/config.c in 
> usb_get_configuration function. I already wrote about this slub bug
> report and offered a
> patch(http://www.uwsg.iu.edu/hypermail/linux/kernel/0705.1/0154.html). I
> don't know, may be it is not major thing, if it is, just ignore it. I
> just think, that 
> --
> 	length = ncfg * sizeof(struct usb_host_config);
> 	dev->config = kzalloc(length, GFP_KERNEL);
> --
> isn't clear, because ncfg - in my case - is 0 and I suppose, that size
> of the leastest slab cache can become(in future) smaller than
> sizeof(struct usb_host_config).

There is yet another patch for this:
http://lkml.org/lkml/2007/5/19/171
sitting here:
http://kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-03-usb/usb-don-t-try-to-kzalloc-0-bytes.patch

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-21  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21  2:05 [RFC] linux-2.6.22-rc2. SLUB report[kzalloc(0)] Dan Kruchinin
2007-05-21  8:30 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).