linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] task_struct: add PF_NONOTIFY for fanotify to use
@ 2009-08-28 18:55 Eric Paris
  2009-08-28 18:55 ` [PATCH 2/9] vfs: introduce FMODE_NONOTIFY Eric Paris
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Eric Paris @ 2009-08-28 18:55 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, netdev; +Cc: davem, viro, alan, hch

Since fanotify opens file descriptors inside the kernel for it's listeners
it needs a way to make sure that 2 fanotify listeners, both which listen to
open events do not continuously see each others open events (and get into a
livelock reporting on each other's activity).  This fix is to create a new
tast_struct flags called PF_NONOTIFY.  If this flag is set in a task no
fanotify events will be generated for that task.   fanotify will set the
flag before and open call and will clear it immediately after.

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

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

diff --git a/include/linux/sched.h b/include/linux/sched.h
index b88872f..3c1ce66 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1695,6 +1695,7 @@ extern cputime_t task_gtime(struct task_struct *p);
 #define PF_EXITING	0x00000004	/* getting shut down */
 #define PF_EXITPIDONE	0x00000008	/* pi exit done on shut down */
 #define PF_VCPU		0x00000010	/* I'm a virtual CPU */
+#define PF_NONOTIFY	0x00000020	/* In fanotify open operation */
 #define PF_FORKNOEXEC	0x00000040	/* forked but didn't exec */
 #define PF_MCE_PROCESS  0x00000080      /* process policy on mce errors */
 #define PF_SUPERPRIV	0x00000100	/* used super-user privileges */


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

end of thread, other threads:[~2009-09-03 20:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-28 18:55 [PATCH 1/9] task_struct: add PF_NONOTIFY for fanotify to use Eric Paris
2009-08-28 18:55 ` [PATCH 2/9] vfs: introduce FMODE_NONOTIFY Eric Paris
2009-08-28 18:55 ` [PATCH 3/9] networking/fanotify: declare fanotify socket numbers Eric Paris
2009-08-28 18:56 ` [PATCH 4/9] fanotify: fscking all notification system Eric Paris
2009-08-28 18:56 ` [PATCH 5/9] fanotify:drop notification if they exist in the outgoing queue Eric Paris
2009-08-28 18:56 ` [PATCH 6/9] fanotify: merge notification events with different masks Eric Paris
2009-08-28 18:56 ` [PATCH 7/9] fanotify: userspace socket Eric Paris
2009-08-28 18:56 ` [PATCH 8/9] fanotify: userspace can add and remove fsnotify inode marks Eric Paris
2009-08-28 18:56 ` [PATCH 9/9] fanotify: send events to userspace over socket reads Eric Paris
2009-08-28 22:36 ` [PATCH 1/9] task_struct: add PF_NONOTIFY for fanotify to use Evgeniy Polyakov
2009-08-28 22:39   ` Eric Paris
2009-08-28 22:50     ` Evgeniy Polyakov
2009-09-03 20:25   ` Eric Paris

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