diff options
author | 2022-01-19 14:02:09 +0100 | |
---|---|---|
committer | 2022-02-03 10:57:44 -0500 | |
commit | 7c268d4ce2d3761f666a9950b029c8902bfab710 (patch) | |
tree | fb0739349fdd94bc701740fa59cf79a79727410b /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | jbd2: refactor wait logic for transaction updates into a common function (diff) | |
download | wireguard-linux-7c268d4ce2d3761f666a9950b029c8902bfab710.tar.xz wireguard-linux-7c268d4ce2d3761f666a9950b029c8902bfab710.zip |
ext4: fix potential NULL pointer dereference in ext4_fill_super()
By mistake we fail to return an error from ext4_fill_super() in case
that ext4_alloc_sbi() fails to allocate a new sbi. Instead we just set
the ret variable and allow the function to continue which will later
lead to a NULL pointer dereference. Fix it by returning -ENOMEM in the
case ext4_alloc_sbi() fails.
Fixes: cebe85d570cf ("ext4: switch to the new mount api")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Link: https://lore.kernel.org/r/20220119130209.40112-1-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions