[dm-devel] [PATCH] dm stats: fix a memory leak
Mikulas Patocka
mpatocka at redhat.com
Wed Feb 15 17:06:19 UTC 2017
Hi Mike
This fixes a memory leak in dm-stats. Put it into your queue of patches
for Linus.
Mikulas
From: Mikulas Patocka <mpatocka at redhat.com>
Fix a leaked array s->histogram_boundaries.
Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
Fixes: dfcfac3e4cd9 ("dm stats: collect and report histogram of IO latencies")
Cc: stable at vger.kernel.org # v4.2+
---
drivers/md/dm-stats.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/drivers/md/dm-stats.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-stats.c
+++ linux-2.6/drivers/md/dm-stats.c
@@ -175,6 +175,7 @@ static void dm_stat_free(struct rcu_head
int cpu;
struct dm_stat *s = container_of(head, struct dm_stat, rcu_head);
+ kfree(s->histogram_boundaries);
kfree(s->program_id);
kfree(s->aux_data);
for_each_possible_cpu(cpu) {
More information about the dm-devel
mailing list