block: bfq: swap puts in bfqg_and_blkg_put
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Thu, 6 Sep 2018 08:05:44 +0000 (11:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:35 +0000 (22:43 +0200)
commit381992bcccac4185ccdbbd2d9a3018238982b963
treec6c77d4967e58135343b16e80d3fb71a69cec89b
parent23ecbbad7bf921f83a5c99718ded203676ddd91c
block: bfq: swap puts in bfqg_and_blkg_put

commit d5274b3cd6a814ccb2f56d81ee87cbbf51bd4cf7 upstream.

Fix trivial use-after-free. This could be last reference to bfqg.

Fixes: 8f9bebc33dd7 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/bfq-cgroup.c