diff options
| author | Myeonghun Pak <mhun512@gmail.com> | 2026-09-10 16:37:27 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-14 19:59:46 +0200 |
| commit | d54229a6b6d68296a4d9c5067c3bc061da639a66 (patch) | |
| tree | 28a8b2b5c9d9498123baa0df70391dbc2754eba9 /rust/kernel/debugfs | |
| parent | fd73f4a6659897191fa0d40695fe370925dd3780 (diff) | |
PNP: Detach device after resource transition failure
pnp_device_probe() attaches the PNP device before it activates or
disables its resources. The attach changes the status from PNP_READY
to PNP_ATTACHED, but errors from either resource transition return
directly and leave that status behind. A later bind or manual PNP
configuration attempt then sees a device that is still marked in use.
Route both errors through the existing failure path so it restores the
status to PNP_READY. Do not disable the device or clean its resources:
pnp_activate_dev() only marks it active after a successful start, while
pnp_disable_dev() preserves the active state and resource table when
stopping fails.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260910203727.63489-1-mhun512@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'rust/kernel/debugfs')
0 files changed, 0 insertions, 0 deletions
