remarkable-linux/include
Dave Hansen e4f674229c mm: pass VM_BUG_ON() reason to dump_page()
I recently added a patch to let folks pass a "reason" string dump_page()
which gets dumped out along with the page's data.  This essentially
saves the bug-reader a trip in to the source to figure out why we
BUG_ON()'d.

The new VM_BUG_ON_PAGE() passes in NULL for "reason".  It seems like we
might as well pass the BUG_ON() condition if we have it.  This will
bloat kernels a bit with ~160 new strings, but this is all under a
debugging option anyway.

	page:ffffea0008560280 count:1 mapcount:0 mapping:(null) index:0x0
	page flags: 0xbfffc0000000001(locked)
	page dumped because: VM_BUG_ON_PAGE(PageLocked(page))
	------------[ cut here ]------------
	kernel BUG at /home/davehans/linux.git/mm/filemap.c:464!
	invalid opcode: 0000 [#1] SMP
	CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.0+ #251
	Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
	...

[akpm@linux-foundation.org: include stringify.h]
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-04 16:53:58 -07:00
..
acpi Merge branch 'acpi-video' 2014-06-03 23:12:37 +02:00
asm-generic x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels 2014-06-04 16:53:55 -07:00
clocksource
crypto crypto: export NULL algorithms defines 2014-03-21 21:54:26 +08:00
drm Merge branch 'mullins' of git://people.freedesktop.org/~deathsimple/linux into drm-fixes 2014-05-07 09:10:28 +10:00
dt-bindings ARM: SoC devicetree updates for 3.16 2014-06-02 16:34:00 -07:00
keys
kvm
linux mm: pass VM_BUG_ON() reason to dump_page() 2014-06-04 16:53:58 -07:00
math-emu
media [media] rc-core: remove generic scancode filter 2014-04-06 11:30:29 -03:00
memory
misc
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial into next 2014-06-04 08:50:34 -07:00
pcmcia
ras
rdma Merge branches 'core', 'cxgb4', 'ip-roce', 'iser', 'misc', 'mlx4', 'nes', 'ocrdma', 'qib', 'sgwrapper', 'srp' and 'usnic' into for-next 2014-04-03 08:30:17 -07:00
rxrpc
scsi scsi: Make sure cmd_flags are 64-bit 2014-04-09 20:26:20 -06:00
sound ASoC: Final updates for v3.16 2014-06-03 11:51:14 +02:00
target target/sbc: Add sbc_dif_read_strip software emulation 2014-04-07 01:48:57 -07:00
trace mm: get rid of __GFP_KMEMCG 2014-06-04 16:53:56 -07:00
uapi sound updates for 3.16-rc1 2014-06-04 09:08:25 -07:00
video OMAPDSS: Add DSS features for AM43xx 2014-05-09 15:11:26 +03:00
xen Merge branch 'for-3.16/drivers' of git://git.kernel.dk/linux-block into next 2014-06-02 13:57:01 -07:00
Kbuild