linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] printk: nbcon: check uart port is nbcon or not in nbcon_release
@ 2024-01-17  6:52 Junxiao Chang
  2024-01-17  8:23 ` John Ogness
  0 siblings, 1 reply; 21+ messages in thread
From: Junxiao Chang @ 2024-01-17  6:52 UTC (permalink / raw)
  To: bigeasy, tglx, rostedt, linux-kernel
  Cc: john.ogness, hao3.li, lili.li, jianfeng.gao, linux-rt-users

Different uart ports might have same console pointer, not all of
uart ports are nbcon. When uart port is shutdown, only release
nbcon if it is nbcon. There is same nbcon checking in API
nbcon_acquire.

Fixes: 6424f396c49e ("printk: nbcon: Implement processing in port->lock wrapper")
Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
---
 kernel/printk/nbcon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index 1b1b585b1675b..e53b8bebbb57e 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 (!con->locked_port)
 		return;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-01-26 16:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17  6:52 [PATCH] printk: nbcon: check uart port is nbcon or not in nbcon_release Junxiao Chang
2024-01-17  8:23 ` John Ogness
2024-01-17  8:45   ` Chang, Junxiao
2024-01-17 10:03     ` John Ogness
2024-01-17 10:24       ` Sebastian Andrzej Siewior
2024-01-17 13:08         ` Chang, Junxiao
2024-01-17 13:42           ` John Ogness
2024-01-23  3:05             ` Chang, Junxiao
2024-01-23  5:40               ` [PATCH 0/2] nbcon locking issue with v6.6.10-rt18 kernel Junxiao Chang
2024-01-23  5:40                 ` [PATCH 1/2] printk: nbcon: move locked_port flag to struct uart_port Junxiao Chang
2024-01-24  9:47                   ` John Ogness
2024-01-24 10:05                     ` Sebastian Andrzej Siewior
2024-01-25  1:08                       ` Chang, Junxiao
2024-01-25 13:35                         ` Sebastian Andrzej Siewior
2024-01-25 23:20                           ` Chang, Junxiao
2024-01-26  7:58                           ` John Ogness
2024-01-26 16:39                             ` Sebastian Andrzej Siewior
2024-01-23  5:40                 ` [PATCH 2/2] printk: nbcon: check uart port is nbcon or not in nbcon_release Junxiao Chang
2024-01-24  9:57                   ` John Ogness
2024-01-26  2:33                     ` Chang, Junxiao
2024-01-24  9:40                 ` [PATCH 0/2] nbcon locking issue with v6.6.10-rt18 kernel John Ogness

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).