Commit 3a196fbe authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Greg Kroah-Hartman

proc: mem_release() should check mm != NULL

commit 71879d3c upstream.

mem_release() can hit mm == NULL, add the necessary check.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58f75a56
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment