summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorThomas Fourier <fourier.thomas@gmail.com>2026-10-29 09:20:55 +0100
committerJakub Kicinski <kuba@kernel.org>2026-10-30 19:04:37 -0700
commitcb284914e749388eef402938bdb3115fe1f6d337 (patch)
tree6d85e2ab8ffc68d4f22df92a622ff15efb29a7d4 /rust/kernel/alloc
parent0a0257228be902ff09608bcaf19ae7c6d58b028f (diff)
net: ipa: Fix double free of the interrupt structure on config error
Since ipa_interrupt_init() allocates struct ipa_interrupt in ipa_probe(), the structure is owned by ipa_probe() and released with ipa_interrupt_exit() on its error paths and in ipa_remove(). The error path of ipa_interrupt_config() still frees it with kfree(). If ipa_interrupt_config() fails (called from ipa_config() via ipa_setup()), ipa_probe() unwinds through err_interrupt_exit, which frees the same structure again. Drop the kfree() from ipa_interrupt_config(); it should only undo what it set up itself. Drop the leftover initialization and cleanup of ipa->interrupt now managed in ipa_proble() and ipa_remove() of ipa_main.c. Fixes: ad1be80d7582 ("net: ipa: introduce ipa_interrupt_init()") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Reviewed-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20261029082100.17722-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions