From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
overlayfs <linux-unionfs@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH v2] ovl: untangle copy up call chain
Date: Thu, 25 Oct 2018 14:59:52 +0200 [thread overview]
Message-ID: <CAJfpegtGqbCMgtSHMoKNMDLjmsZeHKSTfH59vSCco491jtovTA@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegtGtYWbOvVZcobOO_d1OO6GhYEqE=u3OCEG2Cbsm34Eqw@mail.gmail.com>
On Thu, Oct 25, 2018 at 2:44 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>> + temp = ovl_create_temp(c->workdir, &cattr);
>> +out:
>> + if (new_creds) {
>> + revert_creds(old_creds);
>
> Not new in this patch, but it looks like this will Oops if old_creds
> is NULL, which happens if security_inode_copy_up() returns an error.
>
> Trivial to fix, but I'm not sure we need the put_cred(new_creds) in
> the failed security_inode_copy_up() case. Vivek, do you remember the
> reason for this error cleanup?
Answering myself: this bug was introduced by a cleanup patch by me:
7d90b853f932 ("ovl: extract helper to get temp file in copy up")
and so the put_cred() isn't needed in this case at all.
Will do a separate fix.
Thanks,
Miklos
next prev parent reply other threads:[~2018-10-25 21:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 4:25 [PATCH v2] ovl: untangle copy up call chain Amir Goldstein
2018-10-25 12:44 ` Miklos Szeredi
2018-10-25 12:54 ` Amir Goldstein
2018-10-25 12:59 ` Miklos Szeredi [this message]
2018-10-25 13:38 ` Vivek Goyal
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=CAJfpegtGqbCMgtSHMoKNMDLjmsZeHKSTfH59vSCco491jtovTA@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=vgoyal@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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).