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: <4B6A2A51.7050408@cn.fujitsu.com>
Date:	Thu, 04 Feb 2010 10:00:49 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Simon Kagstrom <simon.kagstrom@...insight.net>
CC:	linux-kernel@...r.kernel.org, oleg@...hat.com,
	rusty@...tcorp.com.au, tj@...nel.org, akpm@...ux-foundation.org,
	mingo@...e.hu
Subject: Re: [PATCH] core: workqueue: BUG_ON on workqueue recursion

Simon Kagstrom wrote:
> When the workqueue is flushed from workqueue context (recursively), the
> system enters a strange state where things at random (dependent on the
> global workqueue) start misbehaving. For example, for us the console and
> logins locks up while the web server continues running.
> 
> Since the system becomes unstable, change this to a BUG_ON instead.

For design view, we should disallow this recursion when using workqueue.

I like BUG_ON. But it is not a fatal end usually when it happens,
most developers would like to let system go on.

Acked-by: Lai Jiangshan <laijs@...fujitsu.com>

> 
> Signed-off-by: Simon Kagstrom <simon.kagstrom@...insight.net>
> ---
>  kernel/workqueue.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index dee4865..e617d29 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -482,7 +482,7 @@ static int flush_cpu_workqueue(struct cpu_workqueue_struct *cwq)
>  	int active = 0;
>  	struct wq_barrier barr;
>  
> -	WARN_ON(cwq->thread == current);
> +	BUG_ON(cwq->thread == current);
>  
>  	spin_lock_irq(&cwq->lock);
>  	if (!list_empty(&cwq->worklist) || cwq->current_work != NULL) {

--
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