Skip to content

block: clear ia_ranges on sysfs registration failure - #1142

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1146317=>linus-master
Open

block: clear ia_ranges on sysfs registration failure#1142
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1146317=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block: clear ia_ranges on sysfs registration failure
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1146317

@blktests-ci

blktests-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Author

Upstream branch: 3aa1dca
series: https://patchwork.kernel.org/project/linux-block/list/?series=1146317
version: 1

@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from d89ab11 to fdba928 Compare August 16, 2026 18:34
@blktests-ci

blktests-ci Bot commented Aug 16, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci
blktests-ci Bot force-pushed the series/1146317=>linus-master branch from fb4d437 to 680de08 Compare August 16, 2026 19:48
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci
blktests-ci Bot force-pushed the series/1146317=>linus-master branch from 680de08 to 790e26c Compare August 17, 2026 08:08
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from fdba928 to 60442a3 Compare August 17, 2026 14:10
disk_register_independent_access_ranges() clears disk->ia_ranges when
creating the top-level kobject fails. However, if adding one of the range
kobjects fails, the cleanup drops the final reference to iars and frees it
while disk->ia_ranges still points at it.

A concurrent disk revalidation can wait for q->sysfs_lock and then call
disk_unregister_independent_access_ranges(), which dereferences the stale
pointer after registration releases the mutex.

Clear disk->ia_ranges before dropping the kobject references on the child
registration error path, matching the top-level error handling.

Fixes: a2247f1 ("block: Add independent access ranges support")
Cc: stable@vger.kernel.org
Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1146317
version: 1

@blktests-ci
blktests-ci Bot force-pushed the series/1146317=>linus-master branch from 790e26c to 9969805 Compare August 17, 2026 16:36
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.

1 participant