All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] serial: release the port resources in release_port
@ 2026-12-01 19:20 ` Arina Kharlamova via B4 Relay
  0 siblings, 0 replies; 8+ messages in thread
From: Arina Kharlamova @ 2026-12-01 19:20 UTC (permalink / raw)
  To: Jiri Slaby, John Crispin, Greg Kroah-Hartman
  Cc: linux-kernel, linux-serial, stable, Arina Kharlamova

lantiq and pic32_uart get their port resources with devm in
request_port and do not release all of them in release_port. On lantiq
TIOCSERCONFIG then ends in a NULL pointer access, on pic32 each
TIOCSERCONFIG leaks a mapping.

I found this with spec2patch. I model-checked the probe and remove paths
of the driver with CBMC against formal specifications of the kernel APIs
it calls. The specifications are checked against the kernel source, and
some of them are proved in Rocq against a transcription of the kernel
code. I also checked lock usage separately. With the help of an AI
coding assistant (Claude); I reviewed the analysis and the fix.
Compile-tested only, not tested on hardware.

To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
Arina Kharlamova (2):
      serial: lantiq: release the memory region in release_port
      serial: pic32_uart: unmap the registers in release_port

 drivers/tty/serial/lantiq.c     | 6 ++++++
 drivers/tty/serial/pic32_uart.c | 2 ++
 2 files changed, 8 insertions(+)
---
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
change-id: 20261201-s2p-lpr-tty-49d26c5fa81d

Best regards,
--  
Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>


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

end of thread, other threads:[~2026-12-01 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 19:20 [PATCH 0/2] serial: release the port resources in release_port Arina Kharlamova
2026-12-01 19:20 ` Arina Kharlamova via B4 Relay
2026-12-01 19:20 ` [PATCH 1/2] serial: lantiq: release the memory region " Arina Kharlamova
2026-12-01 19:20   ` Arina Kharlamova via B4 Relay
2026-12-01 20:01   ` John Crispin
2026-12-01 19:20 ` [PATCH 2/2] serial: pic32_uart: unmap the registers " Arina Kharlamova
2026-12-01 19:20   ` Arina Kharlamova via B4 Relay
2026-12-01 19:29 ` [PATCH 0/2] serial: release the port resources " sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.