# Re: \[PATCH\] bfq: Fix use-after-free with cgroups

- From: Holger Hoffstätte \<hidden\>
- Date: 2021-12-07 14:53:57 
- List: cgroups
- Page: https://ratatoskr.run/cgroups/2021/12/6407573
- Thread: https://ratatoskr.run/linux-block/2021/12/6407457/t.md

```text

On 2021-12-01 14:34, Jan Kara wrote:
> BFQ started crashing with 5.15-based kernels like:
>
> BUG: KASAN: use-after-free in rb_erase (lib/rbtree.c:262 lib/rbtr
> Read of size 8 at addr ffff888008193098 by task bash/1472
[snip]

This does not compile when CONFIG_BFQ_GROUP_IOSCHED is disabled.
I know the patch is meant for the case where it is enabled, but still..

block/bfq-iosched.c: In function 'bfq_init_bfqq':
block/bfq-iosched.c:5362:51: error: 'struct bfq_group' has no member named 'children'
 5362 |         hlist_add_head(&bfqq->children_node, &bfqg->children);
      |                                                   ^~
make[1]: *** [scripts/Makefile.build:277: block/bfq-iosched.o] Error 1

Probably just needs a few more ifdefs :)

cheers
Holger
```
