linux/drivers/net/ipa
Ruoyu Wang 6b9eaa61ff net: ipa: balance runtime PM reference on remove error
ipa_remove() takes a runtime PM reference before accessing IPA hardware
during teardown. If a concurrent modem start or stop keeps
ipa_modem_stop() busy across both attempts, the callback intentionally
returns without releasing the remaining resources because proceeding
with teardown could crash. That return also skips the matching
pm_runtime_put_noidle(), leaving the callback's usage-count reference
held.

Drop only this runtime PM reference before returning.
pm_runtime_put_noidle() does not request an idle transition, so the
hardware and resources retained on this exceptional path remain
untouched while the usage count stays balanced.

This issue was found by a static analysis checker and confirmed by
manual source review.

Fixes: 923a6b6984 ("net: ipa: get clock in ipa_probe()")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260815151737.3758320-1-ruoyuw560@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-20 12:26:24 -07:00
..
data net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
reg net: ipa: fix event ring index not programmed for IPA v5.0+ 2026-04-09 09:47:31 +02:00
gsi_private.h net: ipa: add some needed struct declarations 2024-04-18 13:01:05 +02:00
gsi_reg.c net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
gsi_reg.h
gsi_trans.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
gsi_trans.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
gsi.c net: ipa: Fix decoding EV_PER_EE for IPA v5.0+ 2026-04-12 13:49:33 -07:00
gsi.h net: ipa: allocate dummy net_device dynamically 2024-04-24 12:00:16 +01:00
ipa_cmd.c net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_cmd.h net: ipa: fix two minor ipa_cmd problems 2024-04-23 13:08:08 +02:00
ipa_data.h net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
ipa_endpoint.c net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_endpoint.h net: ipa: fix two bogus argument names 2024-04-23 13:08:08 +02:00
ipa_gsi.c net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_gsi.h
ipa_interrupt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ipa_interrupt.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_main.c net: ipa: balance runtime PM reference on remove error 2026-08-20 12:26:24 -07:00
ipa_mem.c net: ipa: Grab IMEM slice base/size from DTS 2026-03-03 17:22:14 -08:00
ipa_mem.h net: ipa: include some standard header files 2024-04-18 13:01:05 +02:00
ipa_modem.c net: ipa: fix stalled modem TX queue after runtime resume 2026-08-20 11:33:39 -07:00
ipa_modem.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_power.c net: ipa: make use of dev_err_cast_probe() 2024-08-29 11:41:05 -07:00
ipa_power.h net: ipa: call device_init_wakeup() earlier 2024-04-23 13:08:08 +02:00
ipa_qmi_msg.c net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_qmi_msg.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_qmi.c net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_qmi.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
ipa_reg.c net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
ipa_reg.h net: ipa: more include file cleanup 2024-04-18 13:01:05 +02:00
ipa_resource.c net: ipa: remove unneeded standard includes 2024-04-18 13:01:05 +02:00
ipa_resource.h
ipa_smp2p.c net: ipa: fix SMEM state handle leaks in SMP2P init 2026-06-26 18:40:04 -07:00
ipa_smp2p.h net: ipa: pass a platform device to ipa_smp2p_init() 2024-03-04 11:44:41 +00:00
ipa_sysfs.c net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
ipa_sysfs.h net: ipa: eliminate unneeded struct declarations 2024-04-18 13:01:05 +02:00
ipa_table.c net: ipa: make ipa_table_hash_support() a real function 2024-04-23 13:08:08 +02:00
ipa_table.h net: ipa: make ipa_table_hash_support() a real function 2024-04-23 13:08:08 +02:00
ipa_uc.c net: ipa: Remove redundant pm_runtime_mark_last_busy() calls 2025-10-29 18:55:56 -07:00
ipa_uc.h net: ipa: eliminate unneeded struct declarations 2024-04-18 13:01:05 +02:00
ipa_version.h net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
ipa.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00
Kconfig net: ipa: Switch to generic PAS TZ APIs 2026-07-15 22:17:16 -05:00
Makefile net: ipa: add IPA v5.2 configuration data 2026-04-12 15:26:13 -07:00
reg.h net: ipa: sort all includes 2024-04-18 13:01:05 +02:00