ovl: use ovl_numlower() and ovl_lowerstack() accessors
authorAmir Goldstein <amir73il@gmail.com>
Mon, 3 Apr 2023 08:51:47 +0000 (11:51 +0300)
committerAmir Goldstein <amir73il@gmail.com>
Mon, 19 Jun 2023 11:01:13 +0000 (14:01 +0300)
commit5522c9c7cbd2ab4e886fa1c70896f0bdd483ce0b
tree6b93018913ace4c4d3c1d49768c4a3b4d72fe315
parenta6ff2bc0be179eea72832b5396481a08ccd22d5a
ovl: use ovl_numlower() and ovl_lowerstack() accessors

This helps fortify against dereferencing a NULL ovl_entry,
before we move the ovl_entry reference into ovl_inode.

Reviewed-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/export.c
fs/overlayfs/namei.c
fs/overlayfs/ovl_entry.h
fs/overlayfs/super.c
fs/overlayfs/util.c