From: Miklos Szeredi <miklos@szeredi.hu>
To: Rui Wang <rui.y.wang@intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH] ovl: fix getcwd() failure after unsuccessful rmdir
Date: Wed, 2 Mar 2016 15:17:24 +0100 [thread overview]
Message-ID: <CAJfpegsowAwXL6hWZMa_d3Jwc=unPnDo2A-uQgyoDDw=h9Szqw@mail.gmail.com> (raw)
In-Reply-To: <1454341012-15062-1-git-send-email-rui.y.wang@intel.com>
On Mon, Feb 1, 2016 at 4:36 PM, Rui Wang <rui.y.wang@intel.com> wrote:
> On Sat, Jan 30, 2016 5:44 PM Konstantin Khlebnikov <koct9i@gmail.com> wrote:
>> On Fri, Jan 8, 2016 at 6:09 PM, Rui Wang <rui.y.wang@intel.com> wrote:
>> ovl_remove_upper() should do d_drop() only after it successfully
>> removes the dir, otherwise a subsequent getcwd() system call will
>> fail, breaking userspace programs.
>>
>> This is to fix: https://bugzilla.kernel.org/show_bug.cgi?id=110491
>>
>> Signed-off-by: Rui Wang <rui.y.wang@intel.com>
>>
>> Reviewed-by: Konstantin Khlebnikov <koct9i@gmail.com>
>>
>> The same problem also in ovl_remove_and_whiteout() - when we remove
>> non-pure dentry. It checks that directory isn't empty before, but
>> I'm sure that vfs_rename which exchanges dentry and whiteout could
>> fail for some reason and we'll end with unhashed dentry when nothing
>> actually has been changed.
>
> Yes I had the same feeling. There's a "goto out_d_drop" which causes
> d_drop() to be called if ovl_do_rename() fails. but I wasn't able to
> find a way to reproduce this problem, so I only fixed the problem
> described in bug110491. It's what I could reliably test.
Thanks for the patch. Added to the queue.
Miklos
next prev parent reply other threads:[~2016-03-02 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 15:36 [PATCH] ovl: fix getcwd() failure after unsuccessful rmdir Rui Wang
2016-03-02 14:17 ` Miklos Szeredi [this message]
[not found] <1452265799-4549-1-git-send-email-rui.y.wang@intel.com>
2016-01-30 9:44 ` Konstantin Khlebnikov
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='CAJfpegsowAwXL6hWZMa_d3Jwc=unPnDo2A-uQgyoDDw=h9Szqw@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=koct9i@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=rui.y.wang@intel.com \
--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).