lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Oct 2007 02:24:13 +0900
From:	"Akinobu Mita" <akinobu.mita@...il.com>
To:	"Christoph Lameter" <clameter@....com>
Cc:	linux-kernel@...r.kernel.org,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Pekka Enberg" <penberg@...helsinki.fi>
Subject: Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007/10/12, Christoph Lameter <clameter@....com>:
> On Thu, 11 Oct 2007, Akinobu Mita wrote:
>
> > > Why would get_cpu_slab not work?
> >
> >
> >         case CPU_DEAD:
> >         case CPU_DEAD_FROZEN:
> >                 down_read(&slub_lock);
> >                 list_for_each_entry(s, &slab_caches, list) {
> >                         struct kmem_cache_cpu *c = get_cpu_slab(s, cpu);
> >
> >                         local_irq_save(flags);
> >                         __flush_cpu_slab(s, cpu);
> >                         local_irq_restore(flags);
> >                         free_kmem_cache_cpu(c, cpu);
> >                         s->cpu_slab[cpu] = NULL; <----------------------
> >                 }
> >                 up_read(&slub_lock);
> >                 break;
> >
> > When CPU is offlined, cpu-hotplug notifier sets s->cpu_slab[cpu] = NULL.
> > This means get_cpu_slab() always return NULL when CPU is being onlined.
> > So I can't use get_cpu_slab to check whether kmem_cache_cpu_free
> > initalization for the CPU has already been done or not.
>
> If you have set it to NULL then the earlier kmem_cache_cpu structures has
> been freed. Why is it a problem to allocate another one when the cpu comes
> up again?
>

kmem_cache_cpu_free per-cpu singly list will be broken by calling
init_alloc_cpu_cpu() twice. It happens when online/offlining CPU.
All three patches I send attempt to make init_alloc_cpu_cpu()
called only once for each cpu.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ