projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
879a5a0
)
proc: mem_release() should check mm != NULL
author
Oleg Nesterov
<oleg@redhat.com>
Tue, 31 Jan 2012 16:14:38 +0000
(17:14 +0100)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 1 Feb 2012 22:39:01 +0000
(14:39 -0800)
mem_release() can hit mm == NULL, add the necessary check.
Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c
patch
|
blob
|
history
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index
9cde9ed
..
c3617ea
100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-822,8
+822,8
@@
loff_t mem_lseek(struct file *file, loff_t offset, int orig)
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;
}