1 From crosslonelyover@gmail.com Wed Apr 21 12:08:05 2010
2 From: Wang Sheng-Hui <crosslonelyover@gmail.com>
3 Date: Tue, 13 Apr 2010 21:04:10 +0800
4 Subject: trace: Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()
5 To: Greg KH <greg@kroah.com>
7 Message-ID: <i2g5a774f4c1004130604vbd24fc79y911d34408ff7e6f0@mail.gmail.com>
9 From: Wang Sheng-Hui <crosslonelyover@gmail.com>
11 [No matching upstream git commit id as it was fixed differently due to a
12 rewrite of the tracing code there.]
14 For normal case, the code in trace_free_page() do once more substraction
15 on tracing_pages_allocated, but for CONFIG_TRACER_MAX_TRACE it doesn't
16 take the freed page into account. That's not consistent with
17 trace_alloc_page(). Well, for there are no message related with this,
18 so we cannot observe its incorrect state when the kernel doesn't define
19 "CONFIG_TRACER_MAX_TRACE". If you add some pr_info() as
20 trace_alloc_page(), you may notice it.
22 Cc: Steven Rostedt <rostedt@goodmis.org>
23 Cc: Frederic Weisbecker <fweisbec@gmail.com>
24 Cc: Ingo Molnar <mingo@redhat.com>
25 Cc: Li Zefan <lizf@cn.fujitsu.com>
26 Signed-off-by: Wang Sheng-Hui <crosslonelyover@gmail.com>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30 kernel/trace/trace.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
33 --- a/kernel/trace/trace.c
34 +++ b/kernel/trace/trace.c
35 @@ -3018,7 +3018,6 @@ static int trace_free_page(void)
38 tracing_pages_allocated--;
39 - tracing_pages_allocated--;
43 @@ -3036,6 +3035,7 @@ static int trace_free_page(void)
44 page = list_entry(p, struct page, lru);
47 + tracing_pages_allocated--;