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] [day] [month] [year] [list]
Date:	Mon, 18 Jan 2016 02:26:52 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	ying.huang@...ux.intel.com, mhocko@...e.com
Cc:	lkp@...org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, arekm@...en.pl, js1304@...il.com,
	clameter@....com, tj@...nel.org, torvalds@...ux-foundation.org
Subject: Re: [lkp] [mm, vmstat] 373ccbe592: BUG: unable to handle kernel

On Fri, 2016-01-08 at 19:32 +0900, Tetsuo Handa wrote:
[...]
> Thank you. I think that start_shepherd_timer() started shepherd item
> and vmstat_shepherd() is called before vmstat_wq = alloc_workqueue() is
> called. We are sometimes too late to allocate vmstat_wq workqueue.
> Please try below one.
> 
> ----------
> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index 4ebc17d..6478929 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1545,12 +1545,12 @@ static struct notifier_block vmstat_notifier =
>  static int __init setup_vmstat(void)
>  {
>  #ifdef CONFIG_SMP
> +	vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
>  	cpu_notifier_register_begin();
>  	__register_cpu_notifier(&vmstat_notifier);
>  
>  	start_shepherd_timer();
>  	cpu_notifier_register_done();
> -	vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
>  #endif
>  #ifdef CONFIG_PROC_FS
>  	proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
> ----------
> 
> We need to backport this fix to stable since this commit already went to 3.2.75.

Thanks.  In 3.2.75 this precise race doesn't seem to exist, but I did
put the alloc_workqueue() after register_cpu_notifier() whereas it
should go before.

Ben.

-- 
Ben Hutchings
A free society is one where it is safe to be unpopular. - Adlai Stevenson
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ