Skip to content

Commit

Permalink
ovl: fix NULL pointer dereference in copy up warning
Browse files Browse the repository at this point in the history
commit 4ee7e4a upstream.

This patch is fixing a NULL pointer dereference to get a recently
introduced warning message working.

Fixes: 5b0a414 ("ovl: fix filattr copy-up failure")
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Cc: <stable@vger.kernel.org> # v5.15
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
ch-f authored and gregkh committed Feb 5, 2022
1 parent 5afee7b commit 9c7f8a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/overlayfs/copy_up.c
Expand Up @@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
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;
}

Expand Down Expand Up @@ -178,7 +178,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
return 0;
}
pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
new, err);
new->dentry, err);
return err;
}

Expand Down

0 comments on commit 9c7f8a3

Please sign in to comment.