diff options
| author | Erni Sri Satya Vennela <ernis@linux.microsoft.com> | 2026-04-20 15:47:39 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-04-23 13:49:13 +0300 |
| commit | 65267c9c4f28199985505977bc2c628c82fc50ef (patch) | |
| tree | 84c80f63b2ba855b7a223ad910d4b675757c07a0 /scripts/checkstack.pl | |
| parent | a7fdaf069bd031fcc234581fa6a580be11bf2175 (diff) | |
| download | linux-65267c9c4f28199985505977bc2c628c82fc50ef.tar.xz | |
net: mana: Fix EQ leak in mana_remove on NULL port
In mana_remove(), when a NULL port is encountered in the port iteration
loop, 'goto out' skips the mana_destroy_eq(ac) call, leaking the event
queues allocated earlier by mana_create_eq().
This can happen when mana_probe_port() fails for port 0, leaving
ac->ports[0] as NULL. On driver unload or error cleanup, mana_remove()
hits the NULL entry and jumps past mana_destroy_eq().
Change 'goto out' to 'break' so the for-loop exits normally and
mana_destroy_eq() is always reached. Remove the now-unreferenced out:
label.
Fixes: 1e2d0824a9c3 ("net: mana: Add support for EQ sharing")
Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Link: https://patch.msgid.link/20260420124741.1056179-6-ernis@linux.microsoft.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
