[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4EAA51D5.8080706@cn.fujitsu.com>
Date: Fri, 28 Oct 2011 14:55:17 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] tracing: fix event system memory leak
system->ref_count = system->nr_events + ref_count for opening "enable"
and "filter"
so when removing a module, it's wrong to drop ref_count only when nr_events
drops to 0.
Cc: stable <stable@...nel.org>
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
---
kernel/trace/trace_events.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 581876f..281a60a 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1252,8 +1252,8 @@ static void remove_subsystem_dir(const char *name)
if (!--system->nr_events) {
debugfs_remove_recursive(system->entry);
list_del(&system->list);
- __put_system(system);
}
+ __put_system(system);
break;
}
}
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists