Skip to content

blk-cgroup: fix lost wakeup in blkg_destroy_all() - #1122

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

blk-cgroup: fix lost wakeup in blkg_destroy_all()#1122
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1144043=>linus-master

Conversation

@blktests-ci

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

Copy link
Copy Markdown

Pull request for series with
subject: blk-cgroup: fix lost wakeup in blkg_destroy_all()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1144043

@blktests-ci

blktests-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci

blktests-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci
blktests-ci Bot force-pushed the series/1144043=>linus-master branch from 206dca5 to 7c58a0f Compare August 12, 2026 13:53
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from ea2c39d to 4082a30 Compare August 12, 2026 18:56
@blktests-ci

blktests-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci
blktests-ci Bot force-pushed the series/1144043=>linus-master branch from 7c58a0f to d7a3d7b Compare August 12, 2026 19:40
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 4082a30 to 36bd7eb Compare August 13, 2026 19:18
@blktests-ci

blktests-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown
Author

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

@blktests-ci
blktests-ci Bot force-pushed the series/1144043=>linus-master branch from d7a3d7b to 02577f0 Compare August 13, 2026 19:55
@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=1144043
version: 1

@blktests-ci
blktests-ci Bot force-pushed the series/1144043=>linus-master branch from 02577f0 to d685e46 Compare August 16, 2026 19:56
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from fdba928 to 60442a3 Compare August 17, 2026 14:10
@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=1144043
version: 1

wake_up_var() requires a full barrier between making the wait condition
true and its lockless waitqueue check. spin_unlock_irq() has only
release semantics, so it does not order q->root_blkg = NULL against
that check.

During disk rebind, blkcg_init_disk() can therefore miss the wakeup and
sleep indefinitely. Add the required smp_mb(). Also mark the store with
WRITE_ONCE() since the waiter reads root_blkg locklessly with
READ_ONCE(). An LKMM model permits the missed-wakeup outcome without
the barrier and forbids it with the barrier.

Fixes: 3dbaacf ("blk-cgroup: wait for blkcg cleanup before initializing new disk")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-fable-5
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
@blktests-ci
blktests-ci Bot force-pushed the series/1144043=>linus-master branch from d685e46 to 0210de8 Compare August 17, 2026 16:43
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