Re: [RFC/PATCH] inotify -- a dnotify replacement

From: John McCutchan
Date: Tue May 11 2004 - 16:32:06 EST

On Tue, 2004-05-11 at 16:28, carbonated beverage wrote:
> On Tue, May 11, 2004 at 03:02:31PM -0400, John McCutchan wrote:
> > >From a quick glance at someone elses implementation of it, I plan on
> > walking up the dentries and checking at each level if a watcher on that
> > level is interested in events from subdirectories. Is this good practice in
> > the kernel?
> Curious, why is it being implemented in this fashion instead of broadcasting
> it over a netlink socket?

I think this would be a security issue. How would you control access to
the events so that you can't watch directories you shouldn't be able to

> As for the directory heirarchy watching, does that mean the user can do:
> <process 1> <process 2>
> while : ; do mkdir a ; cd a ; done
> .... wait 10 seconds ....
> listen to a/
> What's the kernel going to do then? Hopefully, you don't mean you'll
> be crawling down the entire chain each and every time...

You are right this would be a big problem. I am not sure the best way to
handle events from sub-directories.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at