Skip to content

wifi: ath11k/ath12k: Fix MHI leak on power up failure

Vladimir Zapolskiy ath11k ath12k linux-wireless 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v11 patch 3 repliesSuperseded

Changes in v2 from the cover letter

* fixed double unprepare by introducing new "MHI prepared" flag (Baochen),
* added a similar ath12 memory leak fix.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2wifi: ath11k: Unprepare MHI on power up failuredrivers/net/wireless/ath/ath11k/mhi.c drivers/net/wireless/ath/ath11k/pci.h+9 -10 replies
2/2wifi: ath12k: Unprepare MHI on power up failuredrivers/net/wireless/ath/ath12k/mhi.c+14 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] wifi: ath11k/ath12k: Fix MHI leak on power up failure

If MHI power up fails, for instance due to a missing firmware file, the MHI device context and the RDDM image table allocated by mhi_prepare_for_power_up() are leaked on probe error path in both ath11k and ath12k drivers.

The fixes keep MHI prepared on the power up error path, so a firmware crash dump collection in the reset work can still read the RDDM image, and release it on driver unregistration or before MHI is prepared again.

Changes from v1 to v2:
* fixed double unprepare by introducing new "MHI prepared" flag (Baochen),
* added a similar ath12 memory leak fix.

Link to v1:
* https://lore.kernel.org/linux-wireless/[email protected]/

Vladimir Zapolskiy (2):
wifi: ath11k: Unprepare MHI on power up failure
wifi: ath12k: Unprepare MHI on power up failure

 drivers/net/wireless/ath/ath11k/mhi.c |  9 ++++++++-
 drivers/net/wireless/ath/ath11k/pci.h |  1 +
 drivers/net/wireless/ath/ath12k/mhi.c | 14 ++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0