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:	Thu, 17 Nov 2011 13:29:06 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	linux-rt-users <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH -rt] printk: Don't emit console_cpu_notify() for CPU_DYING

On Wed, Nov 16, 2011 at 03:48:11PM +0100, Thomas Gleixner wrote:
> On Wed, 16 Nov 2011, Steven Rostedt wrote:
> > Thomas, doesn't printk not print to serial in atomic contexts? Or did

I guess you mean console_trylock_for_printk() will fail in atomic context?
If so, yeah, that doesn't change.

But the issue is console_cpu_notify() call console_lock() directly.
That means below scenario could also happen in mainline:

	CPU A				CPU B

doing printk with console_sem held
				take_cpu_down();
				  cpu_notify(CPU_DYING);
				    console_cpu_notify();
				      console_lock();
				        down(&console_sem);
					  *bang*
  up(&console_sem);

Sounds I should also send this patch to mainline.

Thanks,
Yong
--
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