lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Aug 2019 08:53:06 -0700
From:   Tejun Heo <tj@...nel.org>
To:     axboe@...nel.dk, newella@...com, clm@...com, josef@...icpanda.com,
        dennisz@...com, lizefan@...wei.com, hannes@...xchg.org
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        kernel-team@...com, cgroups@...r.kernel.org,
        Josef Bacik <jbacik@...com>, Rik van Riel <riel@...riel.com>
Subject: [PATCH] blkcg: fix missing free on error path of blk_iocost_init()

blk_iocost_init() forgot to free its percpu stat on the error path.
Fix it.

Signed-off-by: Tejun Heo <tj@...nel.org>
Reported-by: Hillf Danton <hdanton@...a.com>
---
 block/blk-iocost.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index f04a4ed1cb45..9c8046ac5925 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1876,6 +1876,7 @@ static int blk_iocost_init(struct request_queue *q)
 	ret = blkcg_activate_policy(q, &blkcg_policy_iocost);
 	if (ret) {
 		rq_qos_del(q, rqos);
+		free_percpu(ioc->pcpu_stat);
 		kfree(ioc);
 		return ret;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ