All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] serial: liteuart: fix driver unbind
@ 2021-11-17 10:05 Johan Hovold
  2021-11-17 10:05 ` [PATCH v2 1/3] serial: liteuart: fix use-after-free and memleak on unbind Johan Hovold
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johan Hovold @ 2021-11-17 10:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ilia Sergachev, Karol Gugala, Mateusz Holenko, Stafford Horne,
	Andy Shevchenko, linux-serial, linux-kernel, Johan Hovold

Ilia Sergachev noted that the liteuart remove() function would trigger a
NULL-pointer dereference if it was ever called since the driver data
pointer was never initialised.

Turns out there are more bugs in this part of the driver which clearly
has never been tested.

Also relax the Kconfig dependencies so that the driver can be
compile-tested without first enabling a seemingly unrelated SoC
controller driver.

Note that this series depends on the fix by Ilia:

        https://lore.kernel.org/r/20211115031808.7ab632ef@dtkw

Johan


Changes in v2
 - allow compile testing without CONFIG_OF (Andy)
 - reword commit message to clarify that LITEX is neither a build or
   runtime dependency and that the change only makes it easier to
   compile test the driver
 - move the Kconfig patch last in the series
 - add Stafford's reviewed by tags to the two unmodified patches


Johan Hovold (3):
  serial: liteuart: fix use-after-free and memleak on unbind
  serial: liteuart: fix minor-number leak on probe errors
  serial: liteuart: relax compile-test dependencies

 drivers/tty/serial/Kconfig    |  2 +-
 drivers/tty/serial/liteuart.c | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-11-17 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 10:05 [PATCH v2 0/3] serial: liteuart: fix driver unbind Johan Hovold
2021-11-17 10:05 ` [PATCH v2 1/3] serial: liteuart: fix use-after-free and memleak on unbind Johan Hovold
2021-11-17 10:05 ` [PATCH v2 2/3] serial: liteuart: fix minor-number leak on probe errors Johan Hovold
2021-11-17 10:05 ` [PATCH v2 3/3] serial: liteuart: relax compile-test dependencies Johan Hovold
2021-11-17 10:42 ` [PATCH v2 0/3] serial: liteuart: fix driver unbind Andy Shevchenko

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.