This is a note to let you know that I've just added the patch titled
tracing: Fix unmapping loop in tracing_mark_write
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tracing-fix-unmapping-loop-in-tracing_mark_write.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 7215853e985a4bef1a6c14e00e89dfec84f1e457 Mon Sep 17 00:00:00 2001
From: Vikram Mulukutla <[email protected]>
Date: Wed, 17 Dec 2014 18:50:56 -0800
Subject: tracing: Fix unmapping loop in tracing_mark_write
From: Vikram Mulukutla <[email protected]>
commit 7215853e985a4bef1a6c14e00e89dfec84f1e457 upstream.
Commit 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce introduced
an array map_pages that contains the addresses returned by
kmap_atomic. However, when unmapping those pages, map_pages[0]
is unmapped before map_pages[1], breaking the nesting requirement
as specified in the documentation for kmap_atomic/kunmap_atomic.
This was caught by the highmem debug code present in kunmap_atomic.
Fix the loop to do the unmapping properly.
Link:
http://lkml.kernel.org/r/[email protected]
Reviewed-by: Stephen Boyd <[email protected]>
Reported-by: Lime Yang <[email protected]>
Signed-off-by: Vikram Mulukutla <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4694,7 +4694,7 @@ tracing_mark_write(struct file *filp, co
*fpos += written;
out_unlock:
- for (i = 0; i < nr_pages; i++){
+ for (i = nr_pages - 1; i >= 0; i--) {
kunmap_atomic(map_page[i]);
put_page(pages[i]);
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/tracing-fix-unmapping-loop-in-tracing_mark_write.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html