[PATCH v4 0/2] hwmon: (powerz) Fix disconnect and signal handling bugs

From: Pradhan, Sanman

Date: Thu Apr 09 2026 - 20:27:18 EST


From: Sanman Pradhan <psanman@xxxxxxxxxxx>

Fix two independent bugs in the powerz USB hwmon driver:

1. Use-after-free: After USB disconnect frees the URB, a subsequent
sysfs read can dereference the freed pointer.
2. Missing usb_kill_urb() on signal: When
wait_for_completion_interruptible_timeout() is interrupted by a
signal, the in-flight URB is not cancelled.

Changes since v3:
- Patch 1/2: Split from combined patch, reword commit message,
drop unnecessary usb_set_intfdata(NULL) calls.
- Patch 2/2: Split from combined patch, use long type for wait
return value, split into separate signal/timeout checks.

Sanman Pradhan (2):
hwmon: (powerz) Fix use-after-free on USB disconnect
hwmon: (powerz) Fix missing usb_kill_urb() on signal interrupt

drivers/hwmon/powerz.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

--
2.34.1