]> git.ipfire.org Git - thirdparty/kernel/stable.git/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:35:59 +0000 (12:35 +0100)
commit6dba51828dfd31e326e6642727ede24c054a86fe
tree8ffb2227c3cafb3f5ef557769320964a485f8fb7
parentb8f922aa95aa07759623e2adab65bdba8811e808
blk-cgroup: Fix memleak on error path

[ Upstream commit 52abfcbd57eefdd54737fc8c2dc79d8f46d4a3e5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-cgroup.c