]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
blk-mq: Fix memory leak in blk_mq_init_allocated_queue error handling
authorzhengbin <zhengbin13@huawei.com>
Tue, 23 Jul 2019 14:10:42 +0000 (22:10 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:25:50 +0000 (04:25 -0400)
commita47e1608e4bc4db68f22635f90e05e937beccf38
treea23c603af107401c292ae114b03ddd2d554bdcae
parent447ded3e411b2b6d9615c42440ac97b0048d4fc2
blk-mq: Fix memory leak in blk_mq_init_allocated_queue error handling

BugLink: https://bugs.launchpad.net/bugs/1848046
[ Upstream commit 73d9c8d4c0017e21e1ff519474ceb1450484dc9a ]

If blk_mq_init_allocated_queue->elevator_init_mq fails, need to release
the previously requested resources.

Fixes: d34849913819 ("blk-mq-sched: allow setting of default IO scheduler")
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
block/blk-mq.c