Messages in this thread | | | Date | Tue, 22 Nov 2011 08:57:01 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [PATCH] slub: avoid potential NULL dereference or corruption |
| |
On Tue, 22 Nov 2011, Eric Dumazet wrote:
> diff --git a/mm/slub.c b/mm/slub.c > index 7d2a996..e8e6714 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -4436,29 +4436,33 @@ static ssize_t show_slab_objects(struct kmem_cache *s, > for_each_possible_cpu(cpu) { > struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu); > struct page *page; > + int node; > > - if (!c || c->node < 0) > + if (!c) > continue;
Drop the check. c can never be NULL these days.
Otherwiswe it looks okay.
| |