All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <CAOQ4uxhVqttqKDyJjqe-F5JV7_LLcSUP+Xao+WYRDM4azt_4NQ@mail.gmail.com>

diff --git a/a/1.txt b/N1/1.txt
index 4360aa8..576cf29 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -16,4 +16,11 @@
 Attached backport applies and tested on 4.14 and 4.9
 
 Thanks,
-Amir.
\ No newline at end of file
+Amir.
+-------------- next part --------------
+A non-text attachment was scrubbed...
+Name: stable-4.9-fanotify-fix-handling-of-events-on-child-sub-directo.patch
+Type: text/x-patch
+Size: 2522 bytes
+Desc: not available
+URL: <http://lists.linux.it/pipermail/ltp/attachments/20190204/08552cbd/attachment.bin>
\ No newline at end of file
diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index 4107954..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,7 +0,0 @@
-Content-Type: text/x-patch; charset="US-ASCII"; 
-	name="stable-4.9-fanotify-fix-handling-of-events-on-child-sub-directo.patch"
-Content-Disposition: attachment; 
-	filename="stable-4.9-fanotify-fix-handling-of-events-on-child-sub-directo.patch"
-Content-Transfer-Encoding: base64
-Content-ID: <f_jrq69tp30>
-X-Attachment-Id: f_jrq69tp30
diff --git a/a/2.txt b/a/2.txt
deleted file mode 100644
index 1a69c88..0000000
--- a/a/2.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-From 69f364bd1421d7e79b63e62cfd7ea6044249bcef Mon Sep 17 00:00:00 2001
-From: Amir Goldstein <amir73il@gmail.com>
-Date: Tue, 30 Oct 2018 20:29:53 +0200
-Subject: [PATCH] fanotify: fix handling of events on child sub-directory
-
-commit b469e7e47c8a075cc08bcd1e85d4365134bdcdd5 upstream.
-
-When an event is reported on a sub-directory and the parent inode has
-a mark mask with FS_EVENT_ON_CHILD|FS_ISDIR, the event will be sent to
-fsnotify() even if the event type is not in the parent mark mask
-(e.g. FS_OPEN).
-
-Further more, if that event happened on a mount or a filesystem with
-a mount mark that does have that event type in their mask, the "on
-child" event will be reported on the mount mark.  That is not
-desired, because user will get a duplicate event for the same action.
-
-Note that the event reported on the victim inode is never merged with
-the event reported on the parent inode, because of the check in
-should_merge(): old_fsn->inode == new_fsn->inode.
-
-Fix this by looking for a match of an actual event type (i.e. not just
-FS_ISDIR) in parent's inode mark mask and by not reporting an "on child"
-event to group if event type is only found on mount marks.
-
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Amir Goldstein <amir73il@gmail.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-[amir: backport to v4.9]
-Signed-off-by: Amir Goldstein <amir73il@gmail.com>
----
- fs/notify/fsnotify.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
-index a64adc2fced9..56b4f855fa9b 100644
---- a/fs/notify/fsnotify.c
-+++ b/fs/notify/fsnotify.c
-@@ -101,9 +101,9 @@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
- 	parent = dget_parent(dentry);
- 	p_inode = parent->d_inode;
- 
--	if (unlikely(!fsnotify_inode_watches_children(p_inode)))
-+	if (unlikely(!fsnotify_inode_watches_children(p_inode))) {
- 		__fsnotify_update_child_dentry_flags(p_inode);
--	else if (p_inode->i_fsnotify_mask & mask) {
-+	} else if (p_inode->i_fsnotify_mask & mask & ~FS_EVENT_ON_CHILD) {
- 		struct name_snapshot name;
- 
- 		/* we are notifying a parent so come up with the new mask which
-@@ -207,6 +207,10 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
- 	else
- 		mnt = NULL;
- 
-+	/* An event "on child" is not intended for a mount mark */
-+	if (mask & FS_EVENT_ON_CHILD)
-+		mnt = NULL;
-+
- 	/*
- 	 * Optimization: srcu_read_lock() has a memory barrier which can
- 	 * be expensive.  It protects walking the *_fsnotify_marks lists.
--- 
-2.7.4
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 5596f5b..a036935 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -14,30 +14,16 @@
   "From\0Amir Goldstein <amir73il\@gmail.com>\0"
 ]
 [
-  "Subject\0Re: [PATCH 4.14 00/68] 4.14.97-stable review\0"
+  "Subject\0[LTP] [PATCH 4.14 00/68] 4.14.97-stable review\0"
 ]
 [
   "Date\0Mon, 4 Feb 2019 12:12:39 +0200\0"
 ]
 [
-  "To\0Greg Kroah-Hartman <gregkh\@linuxfoundation.org>\0"
+  "To\0ltp\@lists.linux.it\0"
 ]
 [
-  "Cc\0Naresh Kamboju <naresh.kamboju\@linaro.org>",
-  " ltp\@lists.linux.it",
-  " open list <linux-kernel\@vger.kernel.org>",
-  " Linus Torvalds <torvalds\@linux-foundation.org>",
-  " Andrew Morton <akpm\@linux-foundation.org>",
-  " Guenter Roeck <linux\@roeck-us.net>",
-  " Shuah Khan <shuah\@kernel.org>",
-  " patches\@kernelci.org",
-  " Ben Hutchings <ben.hutchings\@codethink.co.uk>",
-  " lkft-triage\@lists.linaro.org",
-  " linux- stable <stable\@vger.kernel.org>",
-  " chrubis <chrubis\@suse.cz>\0"
-]
-[
-  "\0001:1\0"
+  "\0000:1\0"
 ]
 [
   "b\0"
@@ -61,81 +47,14 @@
   "Attached backport applies and tested on 4.14 and 4.9\n",
   "\n",
   "Thanks,\n",
-  "Amir."
-]
-[
-  "\0001:2\0"
-]
-[
-  "fn\0stable-4.9-fanotify-fix-handling-of-events-on-child-sub-directo.patch\0"
-]
-[
-  "b\0"
-]
-[
-  "From 69f364bd1421d7e79b63e62cfd7ea6044249bcef Mon Sep 17 00:00:00 2001\n",
-  "From: Amir Goldstein <amir73il\@gmail.com>\n",
-  "Date: Tue, 30 Oct 2018 20:29:53 +0200\n",
-  "Subject: [PATCH] fanotify: fix handling of events on child sub-directory\n",
-  "\n",
-  "commit b469e7e47c8a075cc08bcd1e85d4365134bdcdd5 upstream.\n",
-  "\n",
-  "When an event is reported on a sub-directory and the parent inode has\n",
-  "a mark mask with FS_EVENT_ON_CHILD|FS_ISDIR, the event will be sent to\n",
-  "fsnotify() even if the event type is not in the parent mark mask\n",
-  "(e.g. FS_OPEN).\n",
-  "\n",
-  "Further more, if that event happened on a mount or a filesystem with\n",
-  "a mount mark that does have that event type in their mask, the \"on\n",
-  "child\" event will be reported on the mount mark.  That is not\n",
-  "desired, because user will get a duplicate event for the same action.\n",
-  "\n",
-  "Note that the event reported on the victim inode is never merged with\n",
-  "the event reported on the parent inode, because of the check in\n",
-  "should_merge(): old_fsn->inode == new_fsn->inode.\n",
-  "\n",
-  "Fix this by looking for a match of an actual event type (i.e. not just\n",
-  "FS_ISDIR) in parent's inode mark mask and by not reporting an \"on child\"\n",
-  "event to group if event type is only found on mount marks.\n",
-  "\n",
-  "Cc: <stable\@vger.kernel.org>\n",
-  "Signed-off-by: Amir Goldstein <amir73il\@gmail.com>\n",
-  "Signed-off-by: Jan Kara <jack\@suse.cz>\n",
-  "[amir: backport to v4.9]\n",
-  "Signed-off-by: Amir Goldstein <amir73il\@gmail.com>\n",
-  "---\n",
-  " fs/notify/fsnotify.c | 8 ++++++--\n",
-  " 1 file changed, 6 insertions(+), 2 deletions(-)\n",
-  "\n",
-  "diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c\n",
-  "index a64adc2fced9..56b4f855fa9b 100644\n",
-  "--- a/fs/notify/fsnotify.c\n",
-  "+++ b/fs/notify/fsnotify.c\n",
-  "\@\@ -101,9 +101,9 \@\@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)\n",
-  " \tparent = dget_parent(dentry);\n",
-  " \tp_inode = parent->d_inode;\n",
-  " \n",
-  "-\tif (unlikely(!fsnotify_inode_watches_children(p_inode)))\n",
-  "+\tif (unlikely(!fsnotify_inode_watches_children(p_inode))) {\n",
-  " \t\t__fsnotify_update_child_dentry_flags(p_inode);\n",
-  "-\telse if (p_inode->i_fsnotify_mask & mask) {\n",
-  "+\t} else if (p_inode->i_fsnotify_mask & mask & ~FS_EVENT_ON_CHILD) {\n",
-  " \t\tstruct name_snapshot name;\n",
-  " \n",
-  " \t\t/* we are notifying a parent so come up with the new mask which\n",
-  "\@\@ -207,6 +207,10 \@\@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,\n",
-  " \telse\n",
-  " \t\tmnt = NULL;\n",
-  " \n",
-  "+\t/* An event \"on child\" is not intended for a mount mark */\n",
-  "+\tif (mask & FS_EVENT_ON_CHILD)\n",
-  "+\t\tmnt = NULL;\n",
-  "+\n",
-  " \t/*\n",
-  " \t * Optimization: srcu_read_lock() has a memory barrier which can\n",
-  " \t * be expensive.  It protects walking the *_fsnotify_marks lists.\n",
-  "-- \n",
-  "2.7.4"
+  "Amir.\n",
+  "-------------- next part --------------\n",
+  "A non-text attachment was scrubbed...\n",
+  "Name: stable-4.9-fanotify-fix-handling-of-events-on-child-sub-directo.patch\n",
+  "Type: text/x-patch\n",
+  "Size: 2522 bytes\n",
+  "Desc: not available\n",
+  "URL: <http://lists.linux.it/pipermail/ltp/attachments/20190204/08552cbd/attachment.bin>"
 ]
 
-070d10a462e6b24e09bdce8db16e7a23508306a8ee6d709c9f9edc047b22a887
+cfece4c8324613bd28cf81442dfd2d2c26e90a41fe9ca5d4601fcbb441328bba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.