]> git.baikalelectronics.ru Git - kernel.git/commit
oom: fix tasklist_lock leak
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Thu, 19 Aug 2010 21:13:39 +0000 (14:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Aug 2010 16:34:55 +0000 (09:34 -0700)
commit6413de86597470ea6c1663e3515a60b48b37182b
tree97db08ef9d74c8fcacff6a96070854a5bc276419
parent33fceacda7cfb94fb7dd9d29d462190a7c4561b2
oom: fix tasklist_lock leak

Commit 0b56dd3ec3 ("oom: fold __out_of_memory into out_of_memory")
introduced a tasklist_lock leak.  Then it caused following obvious
danger warnings and panic.

    ================================================
    [ BUG: lock held when returning to user space! ]
    ------------------------------------------------
    rsyslogd/1422 is leaving the kernel with locks still held!
    1 lock held by rsyslogd/1422:
     #0:  (tasklist_lock){.+.+.+}, at: [<ffffffff810faf64>] out_of_memory+0x164/0x3f0
    BUG: scheduling while atomic: rsyslogd/1422/0x00000002
    INFO: lockdep is turned off.

This patch fixes 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>
mm/oom_kill.c