Thread (3 messages) 3 messages, 3 authors, 8d ago

RE: [PATCH iwl-net v1] idpf: fix lan_regs leak on core init failure

From: Jagielski, Jedrzej <hidden>
Date: 2026-07-06 09:13:08
Also in: intel-wired-lan, lkml

From: xuanqiang.luo@linux.dev <redacted> 
Sent: Friday, July 3, 2026 12:42 PM
From: Xuanqiang Luo <redacted>

idpf_vc_core_init() gets the LAN memory region layout before mapping the
regions and allocating vport resources. Both layout paths allocate
hw->lan_regs, but later error paths return without freeing it.

idpf_vc_core_deinit() does not cover these paths because it returns unless
IDPF_VC_CORE_INIT is set, and that bit is set only after core init
succeeds.

Free hw->lan_regs on the post-allocation error paths and clear the
pointer and region count.

Fixes: 6aa53e861c1a ("idpf: implement get LAN MMIO memory regions")
Signed-off-by: Xuanqiang Luo <redacted>

Looks fine, thanks for the patch!

Reviewed-by: Jedrzej Jagielski <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help