lkml.org 
[lkml]   [2011]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-11-22 15:59    [W:0.048 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site