mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: hch@infradead.org, akpm@linux-foundation.org
Subject: [PATCH 3/3] fsnotify: use the new open-exec hook for inotify and dnotify
Date: Mon, 15 Dec 2008 11:44:19 -0500	[thread overview]
Message-ID: <20081215164419.2018.11097.stgit@paris.rdu.redhat.com> (raw)
In-Reply-To: <20081215164016.2018.4813.stgit@paris.rdu.redhat.com>

inotify and dnotify did not get access events when their children were
accessed for shlib or exec purposes.  Trigger on those events as well.

Signed-off-by: Eric Paris <eparis@redhat.com>
---

 include/linux/fsnotify.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index 88265dd..a7122c6 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -170,6 +170,12 @@ static inline void fsnotify_modify(struct dentry *dentry)
  */
 static inline void fsnotify_open_exec(struct file *file)
 {
+	struct dentry *dentry = file->f_path.dentry;
+	struct inode *inode = dentry->d_inode;
+
+	dnotify_parent(dentry, DN_ACCESS);
+	inotify_dentry_parent_queue_event(dentry, IN_ACCESS, 0, dentry->d_name.name);
+	inotify_inode_queue_event(inode, IN_ACCESS, 0, NULL, NULL);
 }
 
 /*


  parent reply	other threads:[~2008-12-15 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 16:44 [PATCH 0/3] send notification events about exec Eric Paris
2008-12-15 16:44 ` [PATCH 1/3] filesystem notification: create fs/notify to contain all fs notification Eric Paris
2008-12-16  1:02   ` KOSAKI Motohiro
2008-12-16  1:37     ` Eric Paris
2008-12-16  1:46       ` KOSAKI Motohiro
2008-12-15 16:44 ` [PATCH 2/3] fsnotify: sys_execve and sys_uselib do not call into fsnotify Eric Paris
2008-12-16  1:02   ` KOSAKI Motohiro
2008-12-15 16:44 ` Eric Paris [this message]
2008-12-16  1:12   ` [PATCH 3/3] fsnotify: use the new open-exec hook for inotify and dnotify KOSAKI Motohiro
2008-12-16  1:52     ` Eric Paris
2008-12-16  2:01       ` KOSAKI Motohiro

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=20081215164419.2018.11097.stgit@paris.rdu.redhat.com \
    --to=eparis@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®