Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 12, 2026

Pull request for series with
subject: null_blk: fix kmemleak by releasing references to fault configfs items
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1041350

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 12, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1041350
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 12, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1041350
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1041350=>linus-master branch from 4b6fe2c to cf55c1e Compare January 12, 2026 23:58
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 13, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1041556
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1041350=>linus-master branch from cf55c1e to f56ebb9 Compare January 13, 2026 05:35
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 13, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1041587
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1041350=>linus-master branch from f56ebb9 to 9cdebad Compare January 13, 2026 07:02
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from f962a4d to 06634b5 Compare January 13, 2026 21:24
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 13, 2026

Upstream branch: b543459
series: https://patchwork.kernel.org/project/linux-block/list/?series=1041587
version: 1

When CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION is enabled, the null-blk
driver sets up fault injection support by creating the timeout_inject,
requeue_inject, and init_hctx_fault_inject configfs items as children
of the top-level nullbX configfs group.

However, when the nullbX device is removed, the references taken to
these fault-config configfs items are not released. As a result,
kmemleak reports a memory leak, for example:

unreferenced object 0xc00000021ff25c40 (size 32):
  comm "mkdir", pid 10665, jiffies 4322121578
  hex dump (first 32 bytes):
    69 6e 69 74 5f 68 63 74 78 5f 66 61 75 6c 74 5f  init_hctx_fault_
    69 6e 6a 65 63 74 00 88 00 00 00 00 00 00 00 00  inject..........
  backtrace (crc 1a018c86):
    __kmalloc_node_track_caller_noprof+0x494/0xbd8
    kvasprintf+0x74/0xf4
    config_item_set_name+0xf0/0x104
    config_group_init_type_name+0x48/0xfc
    fault_config_init+0x48/0xf0
    0xc0080000180559e4
    configfs_mkdir+0x304/0x814
    vfs_mkdir+0x49c/0x604
    do_mkdirat+0x314/0x3d0
    sys_mkdir+0xa0/0xd8
    system_call_exception+0x1b0/0x4f0
    system_call_vectored_common+0x15c/0x2ec

Fix this by explicitly releasing the references to the fault-config
configfs items when dropping the reference to the top-level nullbX
configfs group.

Cc: stable@vger.kernel.org
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Fixes: bb4c19e ("block: null_blk: make fault-injection dynamically configurable per device")
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
@blktests-ci blktests-ci bot force-pushed the series/1041350=>linus-master branch from 9cdebad to 25d9ba9 Compare January 13, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants