linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Re: [PATCH] ovl: fix NULL pointer dereference
Date: Wed, 12 Jan 2022 21:28:13 +0100	[thread overview]
Message-ID: <515a5cf0d1e35bee96e1ec9a49a46dfb545871eb.camel@googlemail.com> (raw)
In-Reply-To: <c3ede9cee662964c174fdccc0039df8fa0a2be9b.camel@googlemail.com>

> 
> [    9.956738] overlayfs: failed to retrieve upper fileattr
> (index/#61, err=-25)
> [   10.311610] overlayfs: failed to retrieve upper fileattr
> (index/#d, err=-25)
> [   10.712019] overlayfs: failed to retrieve upper fileattr
> (index/#e, err=-25)
> [   31.901577] overlayfs: failed to retrieve upper fileattr
> (index/#64, err=-25)
> 
> These have been -ENOIOCTLCMD errors but got (falsely?) converted to
> -ENOTTY by the recently introduced commit 5b0a414d06c3 ("ovl: fix
> filattr copy-up failure"):
> 
> +       if (err == -ENOIOCTLCMD)
> +               err = -ENOTTY;
> 
> Any ideas?
> 

Doing the same "quirk" for upper fileattr seems to fix the issues, but
I have no clue about any other implications:

diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index 347b06479663..1e69bc000dd8 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -167,6 +167,8 @@ static int ovl_copy_fileattr(struct inode *inode, struct path *old,
 
 	err = ovl_real_fileattr_get(new, &newfa);
 	if (err) {
+		if (err == -ENOTTY || err == -EINVAL)
+			return 0;
 		pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
 			new->dentry, err);
 		return err;






  reply	other threads:[~2022-01-12 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=515a5cf0d1e35bee96e1ec9a49a46dfb545871eb.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).