linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ovl: fix NULL pointer dereference
@ 2022-01-12 18:33 Christoph Fritz
  2022-01-12 18:46 ` Christoph Fritz
  2022-01-14 15:59 ` Miklos Szeredi
  0 siblings, 2 replies; 9+ messages in thread
From: Christoph Fritz @ 2022-01-12 18:33 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Kevin Locke, linux-unionfs

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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-14 16:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 18:33 [PATCH] ovl: fix NULL pointer dereference Christoph Fritz
2022-01-12 18:46 ` 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

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).