projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
344d390
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 13 Feb 2012 19:06:05 +0000
(11:06 -0800)
commit
71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4
upstream.
mem_release() can hit mm == NULL, add the necessary check.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/base.c
patch
|
blob
|
history
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index 7b28f27ad80b1804d78ce59482209dfb49b3adf6..b3e298f2942115c944b91188e6ecb434aed4fbee 100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-886,8
+886,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;
}