[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100525181213.271817897@clark.site>
Date: Tue, 25 May 2010 11:09:10 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org,
Greg KH <greg@...ah.com>
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>, Li Zefan <lizf@...fujitsu.com>,
Wang Sheng-Hui <crosslonelyover@...il.com>
Subject: [12/25] trace: Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Wang Sheng-Hui <crosslonelyover@...il.com>
[No matching upstream git commit id as it was fixed differently due to a
rewrite of the tracing code there.]
For normal case, the code in trace_free_page() do once more substraction
on tracing_pages_allocated, but for CONFIG_TRACER_MAX_TRACE it doesn't
take the freed page into account. That's not consistent with
trace_alloc_page(). Well, for there are no message related with this,
so we cannot observe its incorrect state when the kernel doesn't define
"CONFIG_TRACER_MAX_TRACE". If you add some pr_info() as
trace_alloc_page(), you may notice it.
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Li Zefan <lizf@...fujitsu.com>
Signed-off-by: Wang Sheng-Hui <crosslonelyover@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3018,7 +3018,6 @@ static int trace_free_page(void)
ClearPageLRU(page);
list_del(&page->lru);
tracing_pages_allocated--;
- tracing_pages_allocated--;
__free_page(page);
tracing_reset(data);
@@ -3036,6 +3035,7 @@ static int trace_free_page(void)
page = list_entry(p, struct page, lru);
ClearPageLRU(page);
list_del(&page->lru);
+ tracing_pages_allocated--;
__free_page(page);
tracing_reset(data);
--
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