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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 16 Oct 2012 11:01:16 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	paulmck@...ux.vnet.ibm.com
CC:	linux-kernel@...r.kernel.org, cernekee@...il.com, torbenh@....de,
	torvalds@...ux-foundation.org, tglx@...utronix.de
Subject: Re: [PATCH] Fix scheduling-while-atomic problem in console_cpu_notify()

On 10/16/2012 10:05 AM, Paul E. McKenney wrote:
> On Mon, Oct 15, 2012 at 05:31:28PM -0700, Paul E. McKenney wrote:
>> The console_cpu_notify( function runs with interrupts disabled in
>> the CPU_DEAD case.  It therefore cannot block, for example, as will
>> happen when it calls console_lock().  Therefore, remove the CPU_DEAD
>> leg of the switch statement to avoid this problem.
>>
>> Signed-off-by: Paul E. McKenney <paul.mckenney@...aro.org>
> 
> s/CPU_DEAD/CPU_DYING/
> 
> Apparently it is a bad idea to compose and send a patch while in a
> C++ standards committee meeting where people are arguing about async
> futures...  Fixed patch below.
> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> printk: Fix scheduling-while-atomic problem in console_cpu_notify()
> 
> The console_cpu_notify( function runs with interrupts disabled in
> the CPU_DYING case.  It therefore cannot block, for example, as will
> happen when it calls console_lock().  Therefore, remove the CPU_DYING
> leg of the switch statement to avoid this problem.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> 

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

> diff --git a/kernel/printk.c b/kernel/printk.c
> index 66a2ea3..2d607f4 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -1890,7 +1890,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,
>  	switch (action) {
>  	case CPU_ONLINE:
>  	case CPU_DEAD:
> -	case CPU_DYING:
>  	case CPU_DOWN_FAILED:
>  	case CPU_UP_CANCELED:
>  		console_lock();
> 


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