linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: youngjun <her0gyugyu@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ovl: inode reference leak in ovl_is_inuse true case.
Date: Tue, 16 Jun 2020 08:33:18 +0300	[thread overview]
Message-ID: <CAOQ4uxhS_3Xmf0xpo-6BmxFjSFfJZAmJVpHeZFjrPA+8R4e0gg@mail.gmail.com> (raw)
In-Reply-To: <20200616044647.19071-1-her0gyugyu@gmail.com>

Hi youngjun!

Thank you for your patch.
You asked for guidance about posting patch revisions so let me repeat
my comment in a more clear way (see below).


On Tue, Jun 16, 2020 at 7:46 AM youngjun <her0gyugyu@gmail.com> wrote:
>

When posting a revision of a patch already posted, the practice
is to use the subject prefix [PATCH v2].
This will be auto generated for you with -v option for git format-patch.

Also, it is not valuable to CC LKML on patches with such a narrow
scope. The only relevant CC for this patch is the overlayfs list,
overlayfs maintainer and developers that reviewed v1 (me in that case).

> When "ovl_is_inuse" true case, trap inode reference not put.
> plus adding the comment explaining sequence of
> ovl_is_inuse after ovl_setup_trap.
>

Please add these lines to the bottom of commit message:
(They help the stable tree maintainers know that patch
 should be picked up and to which stable tree)

Fixes: 0be0bfd2de9d ("ovl: fix regression caused by overlapping layers..")
Cc: <stable@vger.kernel.org> # v4.19+
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> Signed-off-by: youngjun <her0gyugyu@gmail.com>
> ---
>  fs/overlayfs/super.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> index 91476bc422f9..0396793dadb8 100644
> --- a/fs/overlayfs/super.c
> +++ b/fs/overlayfs/super.c
> @@ -1029,6 +1029,12 @@ static const struct xattr_handler *ovl_xattr_handlers[] = {
>         NULL
>  };
>
> +/*
> + * Check if lower root conflicts with this overlay layers before checking
> + * if it is in-use as upperdir/workdir of "another" mount, because we do
> + * not bother to check in ovl_is_inuse() if the upperdir/workdir is in fact
> + * in-use by our upperdir/workdir.
> + */

Sorry for not being clear about this comment.
I meant it should come before the call to ovl_setup_trap() in
ovl_get_layers(). It is not true in general that we always call ovl_setup_trap()
before ovl_is_inuse(). It is only true and relevant for checking lower layers.

If anything I wrote is not clear, do not hesitate to ask for more clarification.

Thanks,
Amir.

      reply	other threads:[~2020-06-16  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 15:56 [PATCH] ovl: inode reference leak in "ovl_is_inuse" true case youngjun
2020-06-15 16:45 ` Amir Goldstein
2020-06-16  4:46 ` [PATCH] ovl: inode reference leak in ovl_is_inuse " youngjun
2020-06-16  5:33   ` Amir Goldstein [this message]

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=CAOQ4uxhS_3Xmf0xpo-6BmxFjSFfJZAmJVpHeZFjrPA+8R4e0gg@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=her0gyugyu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).