mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rui Wang <rui.y.wang@intel.com>
To: koct9i@gmail.com
Cc: rui.y.wang@intel.com, miklos@szeredi.hu, viro@zeniv.linux.org.uk,
	linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, vgoyal@redhat.com
Subject: Re: [PATCH] ovl: fix getcwd() failure after unsuccessful rmdir
Date: Mon,  1 Feb 2016 23:36:52 +0800	[thread overview]
Message-ID: <1454341012-15062-1-git-send-email-rui.y.wang@intel.com> (raw)

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
Rui

             reply	other threads:[~2016-02-01 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 15:36 Rui Wang [this message]
2016-03-02 14:17 ` Miklos Szeredi
  -- strict thread matches above, loose matches on Subject: below --
2016-01-08 15:09 Rui Wang
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=1454341012-15062-1-git-send-email-rui.y.wang@intel.com \
    --to=rui.y.wang@intel.com \
    --cc=koct9i@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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

all inboxes | Powered by JetHome®