[PATCH 0/8] mfd: Fix wakeup source leaks on device unbind

Krzysztof Kozlowski posted 8 patches 10 months, 1 week ago
drivers/mfd/88pm886.c         | 6 +++++-
drivers/mfd/as3722.c          | 4 +++-
drivers/mfd/max14577.c        | 1 +
drivers/mfd/max77541.c        | 2 +-
drivers/mfd/max77705.c        | 4 +++-
drivers/mfd/max8925-i2c.c     | 1 +
drivers/mfd/rt5033.c          | 6 +++++-
drivers/mfd/sprd-sc27xx-spi.c | 5 ++++-
8 files changed, 23 insertions(+), 6 deletions(-)
[PATCH 0/8] mfd: Fix wakeup source leaks on device unbind
Posted by Krzysztof Kozlowski 10 months, 1 week ago
Device can be unbound, so driver must also release memory for the wakeup
source.  Use devm for driver already having devm interface and manually
disable wakeup for drivers still having remove() callback to keep
consistent ordering of cleanups.

I did not update the drivers with suppress_bind_attrs and no error paths
after device_init_wakeup() because it would not bring any benefits.

Best regards,
Krzysztof

---
Krzysztof Kozlowski (8):
      mfd: 88pm886: Fix wakeup source leaks on device unbind
      mfd: as3722: Fix wakeup source leaks on device unbind
      mfd: max14577: Fix wakeup source leaks on device unbind
      mfd: max77541: Fix wakeup source leaks on device unbind
      mfd: max77705: Fix wakeup source leaks on device unbind
      mfd: max8925: Fix wakeup source leaks on device unbind
      mfd: rt5033: Fix wakeup source leaks on device unbind
      mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind

 drivers/mfd/88pm886.c         | 6 +++++-
 drivers/mfd/as3722.c          | 4 +++-
 drivers/mfd/max14577.c        | 1 +
 drivers/mfd/max77541.c        | 2 +-
 drivers/mfd/max77705.c        | 4 +++-
 drivers/mfd/max8925-i2c.c     | 1 +
 drivers/mfd/rt5033.c          | 6 +++++-
 drivers/mfd/sprd-sc27xx-spi.c | 5 ++++-
 8 files changed, 23 insertions(+), 6 deletions(-)
---
base-commit: a4cda136f021ad44b8b52286aafd613030a6db5f
change-id: 20250406-mfd-device-wakekup-leak-a98a99acb1fa

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Re: [PATCH 0/8] mfd: Fix wakeup source leaks on device unbind
Posted by Lee Jones 9 months ago
On Sun, 06 Apr 2025 21:50:08 +0200, Krzysztof Kozlowski wrote:
> Device can be unbound, so driver must also release memory for the wakeup
> source.  Use devm for driver already having devm interface and manually
> disable wakeup for drivers still having remove() callback to keep
> consistent ordering of cleanups.
> 
> I did not update the drivers with suppress_bind_attrs and no error paths
> after device_init_wakeup() because it would not bring any benefits.
> 
> [...]

Applied, thanks!

[1/8] mfd: 88pm886: Fix wakeup source leaks on device unbind
      commit: 0fcb3bee6f9e004b1d52ad6e090bcd0ff2cc7add
[2/8] mfd: as3722: Fix wakeup source leaks on device unbind
      commit: 16e0c58e342867fec5198fbd0af7f93f49d12f42
[3/8] mfd: max14577: Fix wakeup source leaks on device unbind
      commit: add4c382ae0185ebdde685b5992efcc3052e487f
[4/8] mfd: max77541: Fix wakeup source leaks on device unbind
      commit: e1b513336240d05e43fb4f0165e2ff242cc5c5aa
[5/8] mfd: max77705: Fix wakeup source leaks on device unbind
      commit: ae3311e911012dc433ba79ef9d5cb6d3eb144223
[6/8] mfd: max8925: Fix wakeup source leaks on device unbind
      commit: a58fa75ee660144620e42abeffd517c6dab40ce7
[7/8] mfd: rt5033: Fix wakeup source leaks on device unbind
      commit: c85164efc5486eb711b376a15aecfd37c292c09f
[8/8] mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind
      commit: 7f8bb8ef012ee27b601b778b3ef33223f242604f

--
Lee Jones [李琼斯]