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: <20070714173950.GA806@tv-sign.ru>
Date:	Sat, 14 Jul 2007 21:39:50 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Steven Rostedt <rostedt@...dmis.org>,
	Christoph Lameter <clameter@....com>
Subject: Re: [PATCH -rt 5/5] slub: -rt port

On 07/14, Peter Zijlstra wrote:
>
> +static void flush_all(struct kmem_cache *s)
> +{
> +	int cpu;
> +	struct workqueue_struct *wq = flush_slab_workqueue;
> +
> +	mutex_lock(&flush_slab_mutex);
> +	for_each_online_cpu(cpu) {
> +		struct slab_work_struct *sw = &per_cpu(slab_works, cpu);
> +
> +		INIT_WORK(&sw->work, flush_cpu_slab_wq);
> +		sw->s = s;
> +		queue_work_cpu(wq, &sw->work, cpu);
> +	}
> +	flush_workqueue(wq);
> +	mutex_unlock(&flush_slab_mutex);
> +}

I suspect this is not cpu-hotplug safe. flush_slab_mutex doesn't protect
from cpu_down(). This means that slab_work_struct could be scheduled on
the already dead CPU. flush_workqueue(wq) will hang in that case.

Oleg.

-
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