linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] tty: serial: samsung: add spin_lock in console_write
@ 2022-04-06  8:22 Jaewon Kim
  2022-04-06  8:22 ` [PATCH 1/1] tty: serial: samsung: add spin_lock for interrupt and console_write Jaewon Kim
  0 siblings, 1 reply; 10+ messages in thread
From: Jaewon Kim @ 2022-04-06  8:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Greg Kroah-Hartman, Alim Akhtar, Jiri Slaby,
	linux-samsung-soc
  Cc: linux-arm-kernel, linux-serial, linux-kernel, Chanho Park,
	Jaewon Kim

When console and printk log are printed at the same time,
they are called through tty driver and console driver concurrently.
In this case, this could lead to potintial issue that
data loss or fifo full.

This issue also occurred with other drivers and has been fixed.
"serial: amba-pl011: lock console writes against interrupts"
 - https://lkml.org/lkml/2012/2/1/495

---
Chnages since v1:
 - locked variable type changed bool from int
 - spin_lock() changed to spin_ock_irqsave()

Jaewon Kim (1):
  tty: serial: samsung: add spin_lock for interrupt and console_write

 drivers/tty/serial/samsung_tty.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

-- 
2.35.1


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

end of thread, other threads:[~2022-04-06 13:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20220405033448epcas2p31f211cf1cd702ad647f75eee36b2d9f4@epcas2p3.samsung.com>
2022-04-05  3:38 ` [PATCH 0/1] tty: serial: samsung: add spin_lock in console_write Jaewon Kim
2022-04-05  3:38   ` [PATCH 1/1] tty: serial: samsung: add spin_lock for interrupt and console_write Jaewon Kim
2022-04-05  5:01     ` Greg Kroah-Hartman
2022-04-05  6:40       ` Jaewon Kim
2022-04-06  8:22 [PATCH v2 0/1] tty: serial: samsung: add spin_lock in console_write Jaewon Kim
2022-04-06  8:22 ` [PATCH 1/1] tty: serial: samsung: add spin_lock for interrupt and console_write Jaewon Kim
2022-04-06  8:21   ` Greg Kroah-Hartman
2022-04-06  8:39     ` Jaewon Kim
2022-04-06  9:48       ` Jiri Slaby
2022-04-06 11:19         ` Jaewon Kim
2022-04-06 11:21           ` Jiri Slaby

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