]> git.itanic.dy.fi Git - linux-stable/commit
blk-cgroup: Fix memleak on error path
authorGabriel Krisman Bertazi <krisman@collabora.com>
Thu, 22 Oct 2020 20:58:41 +0000 (16:58 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Oct 2020 13:57:46 +0000 (07:57 -0600)
commit52abfcbd57eefdd54737fc8c2dc79d8f46d4a3e5
treea5ebedefbf3c4d43496867f39f5fb07e41b9d063
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
blk-cgroup: Fix memleak on error path

If new_blkg allocation raced with blk_policy change and
blkg_lookup_check fails, new_blkg is leaked.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c