Skip to content

Commit 4ee7e4a

Browse files
ch-fMiklos Szeredi
authored andcommitted
ovl: fix NULL pointer dereference in copy up warning
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>
1 parent df0cc57 commit 4ee7e4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/overlayfs/copy_up.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
145145
if (err == -ENOTTY || err == -EINVAL)
146146
return 0;
147147
pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n",
148-
old, err);
148+
old->dentry, err);
149149
return err;
150150
}
151151

@@ -168,7 +168,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
168168
err = ovl_real_fileattr_get(new, &newfa);
169169
if (err) {
170170
pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
171-
new, err);
171+
new->dentry, err);
172172
return err;
173173
}
174174

0 commit comments

Comments
 (0)