Skip to content

RFC misc: ti-st: close transport removal races

Hongyan Xu linux-gpio lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4misc: ti-st: publish the transport only after probe succeedsdrivers/misc/ti-st/st_kim.c+5 -90 replies
2/4misc: ti-st: account published transport usersdrivers/misc/ti-st/st_core.c drivers/misc/ti-st/st_kim.c include/linux/ti_wilink_st.h+42 -100 replies
3/4misc: ti-st: drain published users before transport removaldrivers/misc/ti-st/st_core.c drivers/misc/ti-st/st_kim.c+26 -210 replies
4/4misc: ti-st: synchronize TTY teardown with transport removaldrivers/misc/ti-st/st_core.c+18 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 6.6.y 0/4] misc: ti-st: close transport removal races

The TI shared transport is published before probe completes and remains published while remove tears its core down. The exported protocol entry points can retain the raw core pointer across that teardown. An attached N_TI_WL line discipline and its write-wakeup work provide another path to the same freed core.

This series publishes only fully initialized transports, accounts users of the published pointer, withdraws and drains that pointer on remove, and synchronously closes an attached TTY before freeing the core.

This is an RFC for the 6.6 stable tree because the driver is still present there but was removed from mainline by commit 78fe66360ed6 ("misc: ti-st:
st_kim: remove the driver"). There is consequently no current mainline code location through which these fixes can first be merged.

The patches are based on linux-6.6.y commit da47cbc25466.

Hongyan Xu (4):
misc: ti-st: publish the transport only after probe succeeds
misc: ti-st: account published transport users
misc: ti-st: drain published users before transport removal
misc: ti-st: synchronize TTY teardown with transport removal

 drivers/misc/ti-st/st_core.c | 59 +++++++++++++++++++++++---------
 drivers/misc/ti-st/st_kim.c  | 65 ++++++++++++++++++++++--------------
 include/linux/ti_wilink_st.h |  8 +++++
 3 files changed, 91 insertions(+), 41 deletions(-)
Signature · 1 line
2.50.1.windows.1