linux/fs/ecryptfs
Phillip Potter c6052f09c1 fs: ecryptfs: remove BUG_ON from crypt_scatterlist
crypt_stat memory itself is allocated when inode is created, in
ecryptfs_alloc_inode, which returns NULL on failure and is handled
by callers, which would prevent us getting to this point. It then
calls ecryptfs_init_crypt_stat which allocates crypt_stat->tfm
checking for and likewise handling allocation failure. Finally,
crypt_stat->flags has ECRYPTFS_STRUCT_INITIALIZED merged into it
in ecryptfs_init_crypt_stat as well.

Simply put, the conditions that the BUG_ON checks for will never
be triggered, as to even get to this function, the relevant conditions
will have already been fulfilled (or the inode allocation would fail in
the first place and thus no call to this function or those above it).

Cc: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210503115736.2104747-50-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 18:32:26 +02:00
..
crypto.c fs: ecryptfs: remove BUG_ON from crypt_scatterlist 2021-05-13 18:32:26 +02:00
debug.c ecryptfs: debug: Demote a couple of kernel-doc abuses 2021-04-19 04:42:13 +00:00
dentry.c ecryptfs: dentry: File headers are not good candidates for kernel-doc 2021-04-19 04:42:13 +00:00
ecryptfs_kernel.h Code cleanups and a bug fix 2021-05-06 10:06:39 -07:00
file.c ecryptfs: file: Demote kernel-doc abuses 2021-04-19 04:42:13 +00:00
inode.c Code cleanups and a bug fix 2021-05-06 10:06:39 -07:00
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
keystore.c ecryptfs: keystore: Fix some kernel-doc issues and demote non-conformant headers 2021-04-19 04:42:13 +00:00
kthread.c ecryptfs: kthread: Demote file header and provide description for 'cred' 2021-04-19 04:42:13 +00:00
main.c ecryptfs: fix kernel panic with null dev_name 2021-04-19 05:50:32 +00:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
messaging.c eCryptfs: Use DEFINE_MUTEX() for mutex lock 2021-04-19 04:42:13 +00:00
miscdev.c ecryptfs: miscdev: File headers are not good kernel-doc candidates 2021-04-19 04:42:13 +00:00
mmap.c ecryptfs: mmap: Help out one function header and demote other abuses 2021-04-19 04:42:13 +00:00
read_write.c ecryptfs: read_write: File headers do not make good candidates for kernel-doc 2021-04-19 04:42:13 +00:00
super.c ecryptfs: super: Fix formatting, naming and kernel-doc abuses 2021-04-19 04:42:13 +00:00