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]
Date: Tue, 23 Jan 2024 13:40:33 +0800
From: Junxiao Chang <junxiao.chang@...el.com>
To: bigeasy@...utronix.de,
	tglx@...utronix.de,
	rostedt@...dmis.org,
	linux-kernel@...r.kernel.org
Cc: john.ogness@...utronix.de,
	hao3.li@...el.com,
	lili.li@...el.com,
	jianfeng.gao@...el.com,
	linux-rt-users@...r.kernel.org
Subject: [PATCH 2/2] printk: nbcon: check uart port is nbcon or not in nbcon_release

Try to release nbcon only if current uart port is nbcon, as it does
in nbcon_acquire.

Signed-off-by: Junxiao Chang <junxiao.chang@...el.com>
---
 kernel/printk/nbcon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index b53d93585ee71..d8c6f30adde8b 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -1623,6 +1623,9 @@ void nbcon_release(struct uart_port *up)
 		.prio		= NBCON_PRIO_NORMAL,
 	};
 
+	if (!uart_is_nbcon(up))
+		return;
+
 	if (!up->nbcon_locked_port)
 		return;
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ