This is a note to let you know that I've just added the patch titled
proc: mem_release() should check mm != NULL
to the 3.2-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:
proc-mem_release-should-check-mm-null.patch
and it can be found in the queue-3.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4 Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <[email protected]>
Date: Tue, 31 Jan 2012 17:14:38 +0100
Subject: proc: mem_release() should check mm != NULL
From: Oleg Nesterov <[email protected]>
commit 71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4 upstream.
mem_release() can hit mm == NULL, add the necessary check.
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/proc/base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -886,8 +886,8 @@ loff_t mem_lseek(struct file *file, loff
static int mem_release(struct inode *inode, struct file *file)
{
struct mm_struct *mm = file->private_data;
-
- mmput(mm);
+ if (mm)
+ mmput(mm);
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.2/proc-make-sure-mem_open-doesn-t-pin-the-target-s-memory.patch
queue-3.2/proc-mem_release-should-check-mm-null.patch
queue-3.2/proc-unify-mem_read-and-mem_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