diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-14 19:12:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-24 13:39:14 +0100 |
commit | 52fb03b1369e53a55264a03fc1dd4eb637f3f67c (patch) | |
tree | 8fea0973fec60d5bed33a235507b71bf9f73780c /block | |
parent | 74b00ca221d2bd20c16bd82d4f711d04cb044714 (diff) |
blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats
commit b7131ee0bac5e5df73e4098e77bbddb3a31d06ff upstream.
disk_get_part needs to be paired with a disk_put_part.
Cc: stable@vger.kernel.org
Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index c85fbb666e40..5f965fabb531 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -840,6 +840,7 @@ static void blkcg_fill_root_iostats(void) blkg_iostat_set(&blkg->iostat.cur, &tmp); u64_stats_update_end(&blkg->iostat.sync); } + disk_put_part(part); } } |