linux/include
Linus Torvalds 682e629cd9 Using BUG_ON() as an assert() is _never_ acceptable
commit 21f54ddae4 upstream.

That just generally kills the machine, and makes debugging only much
harder, since the traces may long be gone.

Debugging by assert() is a disease.  Don't do it.  If you can continue,
you're much better off doing so with a live machine where you have a
much higher chance that the report actually makes it to the system logs,
rather than result in a machine that is just completely dead.

The only valid situation for BUG_ON() is when continuing is not an
option, because there is massive corruption.  But if you are just
verifying that something is true, you warn about your broken assumptions
(preferably just once), and limp on.

Fixes: 22f2ac51b6 ("mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page()")
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-11-20 01:17:40 +00:00
..
acpi ACPICA: Tables: Enable default 64-bit FADT addresses favor 2015-07-15 10:01:11 +01:00
asm-generic asm-generic: make get_user() clear the destination on errors 2016-11-20 01:17:26 +00:00
clocksource drivers: clocksource: add support for ARM architected timer event stream 2013-09-26 09:48:00 +01:00
crypto crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path 2016-02-02 19:09:56 +00:00
drm drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil 2016-02-25 10:34:40 +00:00
dt-bindings pinctrl: dra: dt-bindings: Fix output pull up/down 2014-11-27 11:22:05 +00:00
keys KEYS: Separate the kernel signature checking keyring from module signing 2013-09-25 17:17:01 +01:00
kvm arm/arm64: KVM: Require in-kernel vgic for the arch timers 2015-05-20 13:25:52 +01:00
linux Using BUG_ON() as an assert() is _never_ acceptable 2016-11-20 01:17:40 +00:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media media: vb2: fix VBI/poll regression 2014-10-09 12:23:49 -07:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc [media] altera-stapl: it is time to move out from staging 2011-09-23 15:00:57 -03:00
net tcp: fix use after free in tcp_xmit_retransmit_queue() 2016-11-20 01:17:13 +00:00
pcmcia pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate 2013-03-15 12:26:03 -07:00
ras edac: add support for error type "Info" 2013-02-21 14:16:27 -03:00
rdma IB/security: Restrict use of the write() interface 2016-06-15 21:29:28 +01:00
rxrpc atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
scsi scsi: Add intermediate STARGET_REMOVE state to scsi_target_state 2016-08-22 22:37:50 +01:00
sound ALSA: rawmidi: Make snd_rawmidi_transmit() race-free 2016-02-25 00:18:43 +00:00
target target: Fix max_unmap_lba_count calc overflow 2016-11-20 01:16:55 +00:00
trace regmap: introduce regmap_name to fix syscon regmap trace events 2015-04-10 10:03:57 +01:00
uapi net/ipv6: add sysctl option accept_ra_min_hop_limit 2016-03-24 09:59:05 +00:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-06-12 11:32:30 -07:00
xen xen: Add RING_COPY_REQUEST() 2016-01-25 10:43:42 +00:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00