Re: "zero-size memory allocation!" is back for Linux 3.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-01-18 at 09:35 -0500, Dave Anderson wrote:
> 

> > 
> > Which causes this in crash/memory.c:vm_init()
> > 
> >        ARRAY_LENGTH_INIT(vt->kmem_cache_len_nodes, NULL,
> >             "kmem_cache.nodelists", NULL, 0);
> > 
> > to set vt->kmem_cache_len_nodes to 0, and leads to the initialization
> > failure when max_cpudata_limit calls getbuf with a size of 0.
> > 
> > Got a fix in the works yet?
> > 
> > Thanks,
> > Bob Montgomery
> 
> No, afraid not.  Fedora uses slub instead of slab, so I haven't 
> noticed it.  I wonder why kmem_cache_downsize() doesn't recalculate
> vt->kmem_cache_len_nodes based upon "nr_node_ids"?:
> 
>         if (buffer_size < SIZE(kmem_cache_s)) {
> 
>                 if (kernel_symbol_exists("nr_node_ids")) {
>                         get_symbol_data("nr_node_ids", sizeof(int),
>                                 &nr_node_ids);
>                         vt->kmem_cache_len_nodes = nr_node_ids;
> 
>                 } else
>                         vt->kmem_cache_len_nodes = 1;
> 
> Dave

This code is skipped because the buffer_size test is no longer true.
Also references to the nodeslist array are bad because it got changed
from an array to a pointer to an external array.

I have a fix and have tested it to give the same results on a *pre-3.1*
CONFIG_SLAB kernel (compared 6.0.2 to 6.0.2-fix on a 2.6.32 base), but
will now work on trying to verify that it's telling the truth about my
CONFIG_SLAB 3.1 kernel.

More later,
Bob Montgomery

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux