linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fanotify: compare fsid when merging name event
@ 2020-07-28  6:51 Amir Goldstein
  2020-07-28  7:42 ` Jan Kara
  0 siblings, 1 reply; 5+ messages in thread
From: Amir Goldstein @ 2020-07-28  6:51 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-fsdevel

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>
---

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-28  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  6:51 [PATCH] fanotify: compare fsid when merging name event Amir Goldstein
2020-07-28  7:42 ` Jan Kara
2020-07-28  8:06   ` Amir Goldstein
2020-07-28  9:04     ` Jan Kara
2020-07-28  9:20       ` Amir Goldstein

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).