Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71879d3c authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

proc: mem_release() should check mm != NULL



mem_release() can hit mm == NULL, add the necessary check.

Cc: stable@kernel.org
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 879a5a00
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -822,7 +822,7 @@ 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;

	if (mm)
		mmput(mm);
	return 0;
}