diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-09-14 15:36:38 +0800 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-09-14 08:31:09 -0700 |
| commit | c702a5f18b780e477eccbbab558e590e9673e4cb (patch) | |
| tree | 31a09590597768c7e569f140f54411441feccc0e /tools/perf/scripts/python/stackcollapse.py | |
| parent | 0ff9c7775e51ac6d47b1bb5c46f06b1434fe58a8 (diff) | |
| download | linux-next-c702a5f18b780e477eccbbab558e590e9673e4cb.tar.gz linux-next-c702a5f18b780e477eccbbab558e590e9673e4cb.zip | |
hwmon: (w83793) release probe data through kref
w83793_probe() initializes data->kref to manage the lifetime of the
driver data. The normal remove path drops the driver-owned reference
with kref_put(), while watchdog users take and release additional
references through the same kref.
However, the probe error path still frees data directly with kfree().
This bypasses the kref-managed lifetime and discards the initial
reference without a matching kref_put(), leaving the reference
accounting unbalanced.
Drop the probe-owned reference with kref_put() instead and let
w83793_release_resources() perform the final free, matching the normal
remove path.
This issue was found by manual code inspection.
Fixes: 5852f9609d21 ("hwmon: (w83793) Add watchdog functionality")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260914073638.1662500-1-lgs201920130244@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
