[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1766270196.git.waqar.hameed@axis.com>
Date: Sat, 20 Dec 2025 23:46:24 +0100
From: Waqar Hameed <waqar.hameed@...s.com>
To: Sebastian Reichel <sre@...nel.org>, Anton Vorontsov
<avorontsov@...mvista.com>, Marek Vasut <marek.vasut@...il.com>
CC: <kernel@...s.com>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 0/3] power: supply: wm97xx: Fix NULL pointer dereference in
power_supply_changed()
The majority of the drivers in `drivers/power/supply/` do the right
thing when registering an interrupt handler and the `power_supply`
handle; namely making sure that the interrupt handler only runs while
the `power_supply` handle is valid. This driver requests the IRQ a
little too soon, and this can lead to a nasty NULL pointer dereference
as thoroughly explained in the commit message. This patch series also
contains some other related clean-ups that makes life a little easier.
This issue was found when writing a new driver for the upcoming TI
BQ25630 [1]. Patch adding support for that one will be sent as soon as
TI releases the datasheet publicly, which should be anytime soon...
[1] https://www.ti.com/product/BQ25630
Waqar Hameed (3):
power: supply: wm97xx: Fix NULL pointer dereference in
power_supply_changed()
power: supply: wm97xx: Use devm_power_supply_register()
power: supply: wm97xx: Use devm_kcalloc()
drivers/power/supply/wm97xx_battery.c | 40 ++++++++++-----------------
1 file changed, 15 insertions(+), 25 deletions(-)
base-commit: fa084c35afa13ab07a860ef0936cd987f9aa0460
--
2.39.5
Powered by blists - more mailing lists