]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] printk() should not be called under zone->lock
authorKirill Korotaev <dev@openvz.org>
Fri, 23 Jun 2006 09:03:50 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:52 +0000 (07:42 -0700)
commitd0836922368eab7a7f4a6f7e88c32ea21abbd374
tree65cde3cd75bfc1df172f53ca956cba4fa4954a4e
parent8d78c96a82fe77aeb83d19172fa4300a58a0067a
[PATCH] printk() should not be called under zone->lock

This patch fixes printk() under zone->lock in show_free_areas().  It can be
unsafe to call printk() under this lock, since caller can try to
allocate/free some memory and selfdeadlock on this lock.  I found
allocations/freeing mem both in netconsole and serial console.

This issue was faced in reallity when meminfo was periodically printed for
debug purposes and netconsole was used.

Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/page_alloc.c