From: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> commit 4ee7e4a6c9b298da44029ed9ec8ed23ae49cc209 upstream. This patch is fixing a NULL pointer dereference to get a recently introduced warning message working. Fixes: 5b0a414d06c3 ("ovl: fix filattr copy-up failure") Signed-off-by: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> # v5.15 Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/overlayfs/copy_up.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inod if (err == -ENOTTY || err == -EINVAL) return 0; pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n", - old, err); + old->dentry, err); return err; } @@ -178,7 +178,7 @@ static int ovl_copy_fileattr(struct inod return 0; } pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n", - new, err); + new->dentry, err); return err; } Patches currently in stable-queue which might be from chf.fritz@xxxxxxxxxxxxxx are queue-5.15/ovl-don-t-fail-copy-up-if-no-fileattr-support-on-upper.patch queue-5.15/ovl-fix-null-pointer-dereference-in-copy-up-warning.patch