linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fanotify: compare fsid when merging name event
Date: Tue, 28 Jul 2020 09:42:29 +0200	[thread overview]
Message-ID: <20200728074229.GA2318@quack2.suse.cz> (raw)
In-Reply-To: <20200728065108.26332-1-amir73il@gmail.com>

On Tue 28-07-20 09:51:08, Amir Goldstein wrote:
> This was missed when splitting name event from fid event
> 
> Fixes: cacfb956d46e ("fanotify: record name info for FAN_DIR_MODIFY event")
> Cc: <stable@vger.kernel.org> # v5.7+
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>

OK, but given we never enabled FAN_DIR_MODIFY in 5.7, this is just a dead
code there, isn't it? So it should be enough to fix this for the series
that's currently queued?

								Honza

> ---
> 
> Jan,
> 
> We missed a spot in v5.7.
> 
> IMO, the issue is not that critical that we must fast track the fix to
> v5.8, but I am posting this patch based on v5.8-rc7, so you may decide
> whether you want to fast track it or to apply it at the beginning of the
> series for next.
> 
> Either way, this is going to be easier for cherry-picking to stable rather
> that backporting the fix from the top of the series for next.
> I pushed my "forward porting" to branch fsnotify-fixes.
> 
> Thanks,
> Amir.
> 
>  fs/notify/fanotify/fanotify.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
> index 85eda539b35f..04f9a7012f46 100644
> --- a/fs/notify/fanotify/fanotify.c
> +++ b/fs/notify/fanotify/fanotify.c
> @@ -64,6 +64,7 @@ static bool fanotify_name_event_equal(struct fanotify_name_event *fne1,
>  		return false;
>  
>  	if (fne1->name_len != fne2->name_len ||
> +	    !fanotify_fsid_equal(&fne1->fsid, &fne2->fsid) ||
>  	    !fanotify_fh_equal(&fne1->dir_fh, &fne2->dir_fh))
>  		return false;
>  
> -- 
> 2.17.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2020-07-28  7:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  6:51 [PATCH] fanotify: compare fsid when merging name event Amir Goldstein
2020-07-28  7:42 ` Jan Kara [this message]
2020-07-28  8:06   ` Amir Goldstein
2020-07-28  9:04     ` Jan Kara
2020-07-28  9:20       ` Amir Goldstein

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=20200728074229.GA2318@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).