linux/arch
Eric W. Biederman 984bd71fb3 signal/sparc: In setup_tsb_params convert open coded BUG into BUG
The function setup_tsb_params has exactly one caller tsb_grow.  The
function tsb_grow passes in a tsb_bytes value that is between 8192 and
1048576 inclusive, and is guaranteed to be a power of 2.  The function
setup_tsb_params verifies this property with a switch statement and
then prints an error and causes the task to exit if this is not true.

In practice that print statement can never be reached because tsb_grow
never passes in a bad tsb_size.  So if tsb_size ever gets a bad value
that is a kernel bug.

So replace the do_exit which is effectively an open coded version of
BUG() with an actuall call to BUG().  Making it clearer that this
is a case that can never, and should never happen.

Cc: David Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Link: https://lkml.kernel.org/r/20211020174406.17889-8-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2021-10-25 15:56:29 -05:00
..
alpha Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arm ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
arm64 Merge branch 'linus' into smp/urgent 2021-09-11 00:38:47 +02:00
csky Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
m68k Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT 2021-10-25 15:55:35 -05:00
nds32 exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
nios2 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
openrisc exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
parisc parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
powerpc signal/powerpc: On swapcontext failure force SIGSEGV 2021-10-25 15:56:29 -05:00
riscv Updates for the SMP and CPU hotplug: 2021-09-12 12:42:51 -07:00
s390 exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
sh signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) 2021-10-25 15:56:29 -05:00
sparc signal/sparc: In setup_tsb_params convert open coded BUG into BUG 2021-10-25 15:56:29 -05:00
um This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
x86 exit/doublefault: Remove apparently bogus comment about rewind_stack_do_exit 2021-10-20 13:09:43 -05:00
xtensa exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00