public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] statistics: fix cpu hot unplug related memory leak
@ 2007-04-10 15:54 Martin Peschke
  0 siblings, 0 replies; only message in thread
From: Martin Peschke @ 2007-04-10 15:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-s390

In case of CPU hotunplug statistics might have leaked some memory
(lists of struct statistic_entry_sparse, about 32 byte each, freed
by statistic_sparse_reset()).

Patch is against 2.6.21-rc6-mm1.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
---

 statistic.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/lib/statistic.c
===================================================================
--- linux.orig/lib/statistic.c
+++ linux/lib/statistic.c
@@ -308,6 +308,7 @@ static int _statistic_hotcpu(struct stat
 		src = percpu_ptr(stat->data, cpu);
 		disc->merge(stat, dst, src);
 		local_irq_restore(flags);
+		disc->reset(stat, src);
 		percpu_depopulate(stat->data, cpu);
 		break;
 	}



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-10 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10 15:54 [Patch] statistics: fix cpu hot unplug related memory leak Martin Peschke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox