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]
Message-ID: <Pine.LNX.4.64.0701290922390.28330@schroedinger.engr.sgi.com>
Date:	Mon, 29 Jan 2007 09:27:18 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	Oleg Nesterov <oleg@...sign.ru>
cc:	Ingo Molnar <mingo@...e.hu>, Srivatsa Vaddagiri <vatsa@...ibm.com>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	Gautham shenoy <ego@...ibm.com>, Andrew Morton <akpm@...l.org>,
	linux-kernel@...r.kernel.org
Subject: Re: slab: start_cpu_timer/cache_reap CONFIG_HOTPLUG_CPU problems

On Mon, 29 Jan 2007, Oleg Nesterov wrote:

> > > This is wrong. Suppose we have a CPU_UP,CPU_DOWN,CPU_UP sequence. The last
> > > CPU_UP will not restart a per-cpu "cache_reap timer".
> > 
> > Why?
> 
> Because the last CPU_UP calls start_cpu_timer(), but since ->work.func != NULL
> we don't do schedule_delayed_work_on(). I think (if I am right) this is a slab's
> bug.

The CPU_DOWN would need to set work.func == NULL for this to work. But 
then the slab does not shut down the work queues for the processor. Isnt 
this another issue with workqueues? The slab would need a notification 
that the workqueue for a processor was shutdown in order to set work.func 
= NULL.

> I think cache_reap() is not alone, and this is not its fault.
> 
> But please note another minor problem,
> 
> 	void cache_reap(struct work_struct *unused)
> 	{
> 		...
> 
> 		schedule_delayed_work(&__get_cpu_var(reap_work), ...);
> 	}
> 
> Even if smp_processor_id() was stable during the execution of cache_reap(),
> this work_struct can be moved to another CPU if CPU_DEAD happens. We can't
> avoid this, and this is correct.

Uhh.... This may not be correct in terms of how the slab operates.
 
> This means that __get_cpu_var(reap_work) returns a "wrong" struct delayed_work.
> This is absolutely harmless right now, but may be it's better to use
> container_of(unused, struct delayed_work, work).

Well seems that we have a set of unresolved issues with workqueues and cpu 
hotplug.

-
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