aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/rcu.c
diff options
context:
space:
mode:
authorAnders Roxell <[email protected]>2025-07-04 12:53:35 +0000
committerMichael S. Tsirkin <[email protected]>2025-08-01 13:11:08 +0000
commitd9ea58b5dc6b4b50fbb6a10c73f840e8b10442b7 (patch)
treefaf5d37c8f01123472aa44cd15d477a2d4766e3d /rust/helpers/rcu.c
parentvdpa/mlx5: Fix release of uninitialized resources on error path (diff)
downloadkernel-d9ea58b5dc6b4b50fbb6a10c73f840e8b10442b7.tar.gz
kernel-d9ea58b5dc6b4b50fbb6a10c73f840e8b10442b7.zip
vdpa: Fix IDR memory leak in VDUSE module exit
Add missing idr_destroy() call in vduse_exit() to properly free the vduse_idr radix tree nodes. Without this, module load/unload cycles leak 576-byte radix tree node allocations, detectable by kmemleak as: unreferenced object (size 576): backtrace: [<ffffffff81234567>] radix_tree_node_alloc+0xa0/0xf0 [<ffffffff81234568>] idr_get_free+0x128/0x280 The vduse_idr is initialized via DEFINE_IDR() at line 136 and used throughout the VDUSE (vDPA Device in Userspace) driver for device ID management. The fix follows the documented pattern in lib/idr.c and matches the cleanup approach used by other drivers. This leak was discovered through comprehensive module testing with cumulative kmemleak detection across 10 load/unload iterations per module. Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") Signed-off-by: Anders Roxell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions