Re: [syzbot] [block?] [cgroups?] possible deadlock in blkg_conf_prep

From: Björn Bärtschi

Date: Wed Dec 02 2026 - 14:36:55 EST


#syz fix: block: don't enter reclaim under rq_qos_mutex

Commit 045cbfc369f5 (v7.4-rc1) switched the radix_tree_preload() in
blkg_conf_prep() to GFP_NOIO, which removes the blkcg_mutex ->
fs_reclaim edge of this cycle. That also covers the change proposed in
"[PATCH] blk-cgroup: use GFP_NOIO for radix tree preload in
blkg_conf_prep". syzbot has not seen the crash since the merge.

I checked it on v7.4-rc5 with a small trigger: write
"<loop0 maj:min> wiops=100" to io.max of a fresh child cgroup, once per
CPU via taskset. The splat only shows when radix_tree_preload() really
allocates, i.e. on a CPU whose preload pool was never filled, so I used
a 4-CPU guest.

- with 045cbfc369f5 reverted: lockdep reports the same blkcg_mutex /
q_usage_counter(io) / fs_reclaim cycle, with __radix_tree_preload()
<- blkg_conf_prep() as the new edge (2 of 2 runs);
- with 045cbfc369f5 applied: 3 of 3 runs clean.

The syzbot C reproducer did not trigger it in my guest, with or without
the fix.

The analysis was done with the help of an AI assistant (Claude); I
reviewed the results.

Björn