Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

oom: fix NULL pointer dereference

Commit b940fd7035 ("oom: remove unnecessary code and cleanup") added an
unnecessary NULL pointer dereference. remove it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

KOSAKI Motohiro and committed by
Linus Torvalds
be71cf22 f522886e

+2 -3
+2 -3
mm/oom_kill.c
··· 401 401 static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem) 402 402 { 403 403 p = find_lock_task_mm(p); 404 - if (!p) { 405 - task_unlock(p); 404 + if (!p) 406 405 return 1; 407 - } 406 + 408 407 pr_err("Killed process %d (%s) total-vm:%lukB, anon-rss:%lukB, file-rss:%lukB\n", 409 408 task_pid_nr(p), p->comm, K(p->mm->total_vm), 410 409 K(get_mm_counter(p->mm, MM_ANONPAGES)),