mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 00:20:52 -05:00
block: bfq: swap puts in bfqg_and_blkg_put
Fix trivial use-after-free. This could be last reference to bfqg.
Fixes: 8f9bebc33d
("block, bfq: access and cache blkg data only when safe")
Acked-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
8b2ded1c94
commit
d5274b3cd6
1 changed files with 2 additions and 2 deletions
|
@ -275,9 +275,9 @@ static void bfqg_and_blkg_get(struct bfq_group *bfqg)
|
|||
|
||||
void bfqg_and_blkg_put(struct bfq_group *bfqg)
|
||||
{
|
||||
bfqg_put(bfqg);
|
||||
|
||||
blkg_put(bfqg_to_blkg(bfqg));
|
||||
|
||||
bfqg_put(bfqg);
|
||||
}
|
||||
|
||||
/* @stats = 0 */
|
||||
|
|
Loading…
Reference in a new issue