[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080722084526.GA165@tv-sign.ru>
Date: Tue, 22 Jul 2008 12:45:26 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, akinobu.mita@...il.com
Subject: Re: + workqueue-proper-error-unwinding-in-cpu-hotplug-error-path.patch added to -mm tree
On 07/22, Andrew Morton wrote:
>
> From: Akinobu Mita <akinobu.mita@...il.com>
>
> Add proper error unwinding in error path in CPU_UP_PREPARE notifier.
Could you clarify?
> --- a/kernel/workqueue.c~workqueue-proper-error-unwinding-in-cpu-hotplug-error-path
> +++ a/kernel/workqueue.c
> @@ -928,6 +928,15 @@ static int __devinit workqueue_cpu_callb
> break;
> printk(KERN_ERR "workqueue [%s] for %i failed\n",
> wq->name, cpu);
> +
> + list_for_each_entry_continue_reverse(wq, &workqueues,
> + list) {
> + cwq = per_cpu_ptr(wq->cpu_wq, cpu);
> + start_workqueue_thread(cwq, -1);
> + cleanup_workqueue_thread(cwq);
> + }
> + cpu_clear(cpu, cpu_populated_map);
> +
> return NOTIFY_BAD;
If CPU_UP_PREPARE fails, _cpu_up() sends CPU_UP_CANCELED, and afaics
workqueue_cpu_callback() correctly cleanups cwq->thread's.
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