projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d1c156
)
blkcg: fix missing free on error path of blk_iocost_init()
author
Tejun Heo
<tj@kernel.org>
Thu, 29 Aug 2019 15:53:06 +0000
(08:53 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Aug 2019 15:59:14 +0000
(09:59 -0600)
blk_iocost_init() forgot to free its percpu stat on the error path.
Fix it.
Fixes:
7caa47151ab2
("blkcg: implement blk-iocost")
Reported-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c
patch
|
blob
|
history
diff --git
a/block/blk-iocost.c
b/block/blk-iocost.c
index
f04a4ed
..
9c8046a
100644
(file)
--- 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;
}