]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50
authorHelge Deller <deller@gmx.de>
Tue, 28 May 2013 20:35:54 +0000 (20:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jun 2013 17:38:42 +0000 (10:38 -0700)
commit573ae3719ff195084e669b12e7334d77a2a4e111
tree902731da9e10e58592b3b3f4985d7bc1d7b62494
parent8fd29ffeedc34861e5512c4cdc6a3c648880823d
parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50

commit ae249b5fa27f9fba25aa59664d4338efc2dd2394 upstream.

With CONFIG_DISCONTIGMEM=y and multiple physical memory areas,
cat /proc/kpageflags triggers this kernel bug:

kernel BUG at arch/parisc/include/asm/mmzone.h:50!
CPU: 2 PID: 7848 Comm: cat Tainted: G      D W 3.10.0-rc3-64bit #44
 IAOQ[0]: kpageflags_read0x128/0x238
 IAOQ[1]: kpageflags_read0x12c/0x238
 RP(r2): proc_reg_read0xbc/0x130
Backtrace:
 [<00000000402ca2d4>] proc_reg_read0xbc/0x130
 [<0000000040235bcc>] vfs_read0xc4/0x1d0
 [<0000000040235f0c>] SyS_read0x94/0xf0
 [<0000000040105fc0>] syscall_exit0x0/0x14

kpageflags_read() walks through the whole memory, even if some memory
areas are physically not available. So, we should better not BUG on an
unavailable pfn in pfn_to_nid() but just return the expected value -1 or
0.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/mmzone.h