All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tracing/filters: free filter_string in destroy_preds()
@ 2009-06-16  8:39 Li Zefan
  2009-06-16  8:39 ` [PATCH 2/2] tracing/filters: fix race between filter setting and module unload Li Zefan
  2009-06-17 11:13 ` [tip:tracing/urgent] tracing/filters: free filter_string in destroy_preds() tip-bot for Li Zefan
  0 siblings, 2 replies; 4+ messages in thread
From: Li Zefan @ 2009-06-16  8:39 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: Frederic Weisbecker, Tom Zanussi, LKML

filter->filter_string is not freed when unloading a module:

 # insmod trace-events-sample.ko
 # echo "bar < 100" > /mnt/tracing/events/sample/foo_bar/filter
 # rmmod trace-events-sample.ko

[ Impact: fix memory leak when unloading module ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/trace/trace_events_filter.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index b24ab0e..d9f01c1 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -381,6 +381,7 @@ void destroy_preds(struct ftrace_event_call *call)
 			filter_free_pred(filter->preds[i]);
 	}
 	kfree(filter->preds);
+	kfree(filter->filter_string);
 	kfree(filter);
 	call->filter = NULL;
 }
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-17 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16  8:39 [PATCH 1/2] tracing/filters: free filter_string in destroy_preds() Li Zefan
2009-06-16  8:39 ` [PATCH 2/2] tracing/filters: fix race between filter setting and module unload Li Zefan
2009-06-17 11:13   ` [tip:tracing/urgent] " tip-bot for Li Zefan
2009-06-17 11:13 ` [tip:tracing/urgent] tracing/filters: free filter_string in destroy_preds() tip-bot for Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.