From: Christoph Fritz <chf.fritz@googlemail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Kevin Locke <kevin@kevinlocke.name>, linux-unionfs@vger.kernel.org
Subject: [PATCH] ovl: fix NULL pointer dereference
Date: Wed, 12 Jan 2022 19:33:21 +0100 [thread overview]
Message-ID: <10d8ed194b934c298713ad7f0958329b46573dd1.camel@googlemail.com> (raw)
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@googlemail.com>
---
fs/overlayfs/copy_up.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index b193d08a3dc3..347b06479663 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -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;
}
@@ -168,7 +168,7 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
err = ovl_real_fileattr_get(new, &newfa);
if (err) {
pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
- new, err);
+ new->dentry, err);
return err;
}
--
2.30.2
next reply other threads:[~2022-01-12 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 18:33 Christoph Fritz [this message]
2022-01-12 18:46 ` [PATCH] ovl: fix NULL pointer dereference Christoph Fritz
2022-01-12 20:28 ` Christoph Fritz
2022-01-14 16:01 ` Miklos Szeredi
2022-01-12 20:58 ` Kevin Locke
2022-01-12 21:06 ` Christoph Fritz
2022-01-12 22:25 ` Kevin Locke
2022-01-13 23:21 ` Christoph Fritz
2022-01-14 15:59 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10d8ed194b934c298713ad7f0958329b46573dd1.camel@googlemail.com \
--to=chf.fritz@googlemail.com \
--cc=kevin@kevinlocke.name \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).