Yu Kuai 246cf66e30 block, bfq: fix uaf for bfqq in bfq_exit_icq_bfqq
Commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'")
will access 'bic->bfqq' in bic_set_bfqq(), however, bfq_exit_icq_bfqq()
can free bfqq first, and then call bic_set_bfqq(), which will cause uaf.

Fix the problem by moving bfq_exit_bfqq() behind bic_set_bfqq().

Fixes: 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20221226030605.1437081-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-12-26 12:09:56 -07:00
..
2022-12-06 10:18:27 -07:00
2022-12-13 10:43:59 -08:00
2022-10-07 09:19:14 -07:00
2022-11-01 09:12:24 -06:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-02-02 07:49:59 -07:00
2022-11-16 11:32:53 -07:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2022-03-07 12:48:35 -07:00