From: Al Viro <viro@ZenIV.linux.org.uk>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, hch@infradead.org,
alan@lxorguk.ukuu.org.uk, sfr@canb.auug.org.au,
john@johnmccutchan.com, rlove@rlove.org,
akpm@linux-foundation.org
Subject: Re: [PATCH 04/13] fsnotify: add in inode fsnotify markings
Date: Mon, 23 Mar 2009 09:53:47 +0000 [thread overview]
Message-ID: <20090323095347.GO28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20090323092830.GN28946@ZenIV.linux.org.uk>
On Mon, Mar 23, 2009 at 09:28:30AM +0000, Al Viro wrote:
> Note that for inotify ->freeing_mark() will happily add notification to
> group's queue and that's another race of the same nature - even if
> group itself isn't yet freed, that final put_group() might bloody well
> get past flushing the queue.
>
> I really don't like the idea of having marks contributing to group refcount -
> that would have solved this one, but we'd get potential leaks from hell ;-/
> Maybe a separate counter controlling only actual freeing of group?
Actually, let's make it
number of entries with this ->group +
1 if group is not past the eviction of marks in destroy_group
Then destroy_group would evict marks, decrement that sucker and if it's 0 -
call rest_of_destroy_group(). And destroy_mark_by_entry() would
do the same decrement-and-call-if-0. With everything starting at queue
flush done in rest_of_destroy_group().
AFAICS, that would work without creating leaks. Comments?
next prev parent reply other threads:[~2009-03-23 9:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 18:04 [PATCH 01/13] mutex: add atomic_dec_and_mutex_lock Eric Paris
2009-03-19 18:05 ` [PATCH 02/13] fsnotify: unified filesystem notification backend Eric Paris
2009-04-07 23:45 ` Paul E. McKenney
2009-03-19 18:05 ` [PATCH 03/13] fsnotify: add group priorities Eric Paris
2009-03-19 18:05 ` [PATCH 04/13] fsnotify: add in inode fsnotify markings Eric Paris
2009-03-23 9:28 ` Al Viro
2009-03-23 9:53 ` Al Viro [this message]
2009-03-19 18:05 ` [PATCH 05/13] fsnotify: parent event notification Eric Paris
2009-03-19 18:05 ` [PATCH 06/13] dnotify: reimplement dnotify using fsnotify Eric Paris
2009-03-19 18:05 ` [PATCH 07/13] fsnotify: generic notification queue and waitq Eric Paris
2009-03-19 18:05 ` [PATCH 08/13] fsnotify: include pathnames with entries when possible Eric Paris
2009-03-19 18:05 ` [PATCH 09/13] fsnotify: add correlations between events Eric Paris
2009-03-19 18:05 ` [PATCH 10/13] fsnotify: allow groups to add private data to events Eric Paris
2009-03-23 11:04 ` Al Viro
2009-03-19 18:05 ` [PATCH 11/13] fsnotify: fsnotify marks on inodes pin them in core Eric Paris
2009-03-19 18:05 ` [PATCH 12/13] fsnotify: handle filesystem unmounts with fsnotify marks Eric Paris
2009-03-19 18:06 ` [PATCH 13/13] inotify: reimplement inotify using fsnotify Eric Paris
2009-03-23 10:29 ` Al Viro
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=20090323095347.GO28946@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=eparis@redhat.com \
--cc=hch@infradead.org \
--cc=john@johnmccutchan.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rlove@rlove.org \
--cc=sfr@canb.auug.org.au \
/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 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.