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 <[email protected]>
Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Konstantin Khlebnikov authored and Jens Axboe committed 2018-09-06 11:32:58 -06:00
1 parent 8b2ded1c94
commit d5274b3cd6
1 file changed
+2 -2
+2 -2
View File
@@ -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 */