linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Eric Paris <eparis@redhat.com>,
	akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend] audit: fix mark refcounting
Date: Thu, 15 Dec 2011 22:55:17 +0000	[thread overview]
Message-ID: <20111215225517.GT2203@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20111215200631.GA2379@Neptun>

On Thu, Dec 15, 2011 at 09:06:31PM +0100, Lino Sanfilippo wrote:
> On Thu, Dec 15, 2011 at 10:03:41AM +0100, Miklos Szeredi wrote:
> >  
> > +	audit_get_parent(parent);
> >  	fsnotify_destroy_mark(&parent->mark);
> > +	audit_put_parent(parent);
> 
> Hi,
> 
> What about taking an extra ref on an inode mark in send_to_group()
> before we call handle_event()?
> So we dont have to handle the cases in which a mark is destroyed
> explicitly...

The thing is, on most of the method calls we won't need that at all.
And it costs quite a bit, so I'm afraid that this variant is the
way to go.  Yes, it would be nicer to do that in caller, but...

Dunno...  Neither instance actually touches the mark after that
destroy_mark and we have very few of those guys (fortunately).  So
removing this BUG_ON() instead might be the right thing to do.

  parent reply	other threads:[~2011-12-15 22:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 14:59 [PATCH] audit: fix mark refcounting Miklos Szeredi
2011-11-15 14:12 ` Miklos Szeredi
2011-11-15 14:31   ` Eric Paris
2011-12-14 14:35 ` [PATCH resend] " Miklos Szeredi
2011-12-15  2:15   ` Linus Torvalds
2011-12-15  8:40     ` Al Viro
2011-12-15  8:56       ` Miklos Szeredi
2011-12-15  9:01         ` Al Viro
2011-12-15  9:03         ` Miklos Szeredi
2011-12-15 20:06           ` Lino Sanfilippo
2011-12-15 22:28             ` Eric Paris
2011-12-15 22:34               ` Linus Torvalds
2011-12-15 22:55             ` Al Viro [this message]
2012-01-12 16:59               ` Miklos Szeredi
2011-12-15 16:48       ` Linus Torvalds
2011-12-15  8:49     ` Miklos Szeredi

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=20111215225517.GT2203@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=LinoSanfilippo@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).