]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: vme_user: fix location monitor leak in tsi148 bridge
authorHao-Qun Huang <alvinhuang0603@gmail.com>
Sat, 4 Jul 2026 06:58:16 +0000 (14:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jul 2026 11:41:56 +0000 (13:41 +0200)
commit151edde741f8bc7f2931c5f44ab376d32b0c8beb
tree27a67ed29a70fff00a7318dedcee66fd444b9ab1
parente8422d89e8af41d87f0e9db564be8e2634f4c602
staging: vme_user: fix location monitor leak in tsi148 bridge

tsi148_probe() allocates a location monitor resource and links it into
tsi148_bridge->lm_resources. The probe error path frees this list, but
tsi148_remove() only frees the dma, slave and master resource lists, so
the location monitor resource is leaked on device unbind or module
unload.

Free the lm_resources list in tsi148_remove() as well, before
tsi148_bridge is freed.

Fixes: d22b8ed9a3b0 ("Staging: vme: add Tundra TSI148 VME-PCI Bridge driver")
Cc: stable <stable@kernel.org>
Cc: Martyn Welch <martyn@welchs.me.uk>
Assisted-by: Claude:claude-fable-5
Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com>
Link: https://patch.msgid.link/20260704065817.403111-2-alvinhuang0603@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme_user/vme_tsi148.c