Skip to content

blk-cgroup: use GFP_NOIO for radix tree preload in blkg_conf_prep - #1244

Open
blktests-ci-kpd[bot] wants to merge 1 commit into
for-next_basefrom
series/1154151=>for-next
Open

blk-cgroup: use GFP_NOIO for radix tree preload in blkg_conf_prep#1244
blktests-ci-kpd[bot] wants to merge 1 commit into
for-next_basefrom
series/1154151=>for-next

Conversation

@blktests-ci-kpd

Copy link
Copy Markdown

Pull request for series with
subject: blk-cgroup: use GFP_NOIO for radix tree preload in blkg_conf_prep
version: 1
url: https://patchwork.kernel.org/series/1154151/

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: ba285ed
series: https://patchwork.kernel.org/series/1154151/
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1154151/
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To record the empty patch as an empty commit, run "git am --allow-empty".
To restore the original branch and stop patching, run "git am --abort".'

conflict:


@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: ba285ed
series: https://patchwork.kernel.org/series/1154151/
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: dd660a0
series: https://patchwork.kernel.org/series/1154151/
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 9dcbf66
series: https://patchwork.kernel.org/series/1154151/
version: 1

blkg_conf_prep() allocates a new blkg with GFP_NOIO after dropping
queue_lock, but still preloads the radix tree node with GFP_KERNEL while
q->blkcg_mutex is held.

GFP_KERNEL may enter direct reclaim and acquire fs_reclaim, which adds
the dependency

  q->blkcg_mutex -> fs_reclaim

This completes a circular locking dependency with the existing path

  fs_reclaim -> q->q_usage_counter -> q->blkcg_mutex

and triggers a lockdep warning when configuring blkcg policies.

Use GFP_NOIO for radix_tree_preload() so that the preload context matches
the rest of this allocation path and does not recurse into reclaim while
q->blkcg_mutex is held.

Reported-by: syzbot+144a1c0e22e53a08ef5a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=144a1c0e22e53a08ef5a
Fixes: f255c19 ("blk-cgroup: Pre-allocate tree node on blkg_conf_prep")
Cc: stable@vger.kernel.org
Signed-off-by: Tao Yu <tao1.yu@intel.com>
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: ab5dc9d
series: https://patchwork.kernel.org/series/1154151/
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1154151=>for-next branch from a6f3589 to 84dddcc Compare September 12, 2026 02:58
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