fsverity: simplify handling of errors during initcall
authorEric Biggers <ebiggers@google.com>
Wed, 5 Jul 2023 21:27:42 +0000 (14:27 -0700)
committerEric Biggers <ebiggers@google.com>
Wed, 12 Jul 2023 05:49:18 +0000 (22:49 -0700)
commite77000ccc531088c486fe5fbd13416fd5e3d2714
treecc75f2c75caa4054a06635125884bf67210aa066
parent5d37a1198068b099de47073411efc087d1b555ca
fsverity: simplify handling of errors during initcall

Since CONFIG_FS_VERITY is a bool, not a tristate, fs/verity/ can only be
builtin or absent entirely; it can't be a loadable module.  Therefore,
the error code that gets returned from the fsverity_init() initcall is
never used.  If any part of the initcall does fail, which should never
happen, the kernel will be left in a bad state.

Following the usual convention for builtin code, just panic the kernel
if any of part of the initcall fails.

Link: https://lore.kernel.org/r/20230705212743.42180-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/verity/fsverity_private.h
fs/verity/init.c
fs/verity/open.c
fs/verity/signature.c
fs/verity/verify.c