[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 53/78] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats
- To: Jens Axboe <axboe@xxxxxxxxx>
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Mon, 16 Nov 2020 15:57:44 +0100
- Cc: Justin Sanders <justin@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Minchan Kim <minchan@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
- Delivery-date: Mon, 16 Nov 2020 15:10:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
disk_get_part needs to be paired with a disk_put_part.
Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat")
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
block/blk-cgroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index c68bdf58c9a6e1..54fbe1e80cc41a 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -849,6 +849,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);
}
}
--
2.29.2
|