linux-stable/fs/dlm
Arnd Bergmann 6a1fa20e97 dlm: remove BUG() before panic()
[ Upstream commit fe204591cc ]

Building a kernel with clang sometimes fails with an objtool error in dlm:

fs/dlm/lock.o: warning: objtool: revert_lock_pc()+0xbd: can't find jump dest instruction at .text+0xd7fc

The problem is that BUG() never returns and the compiler knows
that anything after it is unreachable, however the panic still
emits some code that does not get fully eliminated.

Having both BUG() and panic() is really pointless as the BUG()
kills the current process and the subsequent panic() never hits.
In most cases, we probably don't really want either and should
replace the DLM_ASSERT() statements with WARN_ON(), as has
been done for some of them.

Remove the BUG() here so the user at least sees the panic message
and we can reliably build randconfig kernels.

Fixes: e7fd41792f ("[DLM] The core of the DLM for GFS2/CLVM")
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: clang-built-linux@googlegroups.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-25 15:41:52 +02:00
..
ast.c dlm: Don't swamp the CPU with callbacks queued during recovery 2019-02-12 19:45:57 +01:00
ast.h
config.c dlm: audit and remove any unnecessary uses of module.h 2016-10-19 11:00:03 -05:00
config.h dlm: add log_info config option 2016-06-21 09:04:24 -05:00
debug_fs.c dlm: Improve a size determination in table_seq_start() 2017-08-07 11:23:09 -05:00
dir.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
dir.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
dlm_internal.h dlm: remove BUG() before panic() 2020-06-25 15:41:52 +02:00
Kconfig fs/dlm: remove CONFIG_EXPERIMENTAL 2012-11-01 15:27:24 -05:00
lock.c dlm: memory leaks on error path in dlm_user_request() 2019-01-13 10:01:05 +01:00
lock.h dlm: adopt orphan locks 2014-11-19 14:48:02 -06:00
lockspace.c dlm: fix missing idr_destroy for recover_idr 2019-12-17 20:37:51 +01:00
lockspace.h
lowcomms.c dlm: use sock_create_lite inside tcp_accept_from_sock 2017-08-07 11:23:09 -05:00
lowcomms.h dlm: fix deadlock between dlm_send and dlm_controld 2012-08-08 11:33:35 -05:00
lvb_table.h
main.c dlm: audit and remove any unnecessary uses of module.h 2016-10-19 11:00:03 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
member.c dlm: fix possible call to kfree() for non-initialized pointer 2019-12-17 20:37:41 +01:00
member.h
memory.c dlm: NULL check before kmem_cache_destroy is not needed 2019-12-17 20:38:17 +01:00
memory.h
midcomms.c
midcomms.h
netlink.c dlm for 4.10 2016-12-14 08:31:37 -08:00
plock.c fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks 2017-07-16 10:28:22 -04:00
rcom.c dlm: fix missing endian conversion of rcom_status flags 2014-10-14 15:11:48 -05:00
rcom.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
recover.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
recover.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
recoverd.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
recoverd.h dlm: fix unlock balance warnings 2012-08-08 11:33:49 -05:00
requestqueue.c dlm: fixes for nodir mode 2012-05-02 14:15:27 -05:00
requestqueue.h
user.c dlm: fix invalid cluster name warning 2019-12-17 20:38:33 +01:00
user.h
util.c
util.h