public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: another problem with latest code drops
Date: Fri, 17 Oct 2008 12:21:41 +1100	[thread overview]
Message-ID: <20081017012141.GJ25906@disturbed> (raw)
In-Reply-To: <48F7E7BA.4070209@sgi.com>

On Fri, Oct 17, 2008 at 11:17:46AM +1000, Lachlan McIlroy wrote:
> Dave Chinner wrote:
>>> I am seeing a lot of memory used here though:
>>>
>>> 116605669 116605669  26%    0.23K 6859157       17  27436628K selinux_inode_security
>>
>> Ah - I don't run selinux. Sounds like a bug that needs reporting
>> to lkml...
>
> I'm sure this is caused by your changes that introduced inode_init_always().
> It re-initialises an existing inode without destroying it first so it calls
> security_inode_alloc() without calling security_inode_free().

I can't think of how. The layers above XFS are symmetric:

	alloc_inode()
	  inode_init_always()
	    security_inode_alloc()
	.....
	security_inode_free()
	->destroy_inode()

So the filesystems should never, ever need to know about the
security context attached to the inode. The changes that introduced
inode_init_always() do not change this symmetry - we do:

	xfs_inode_alloc()
	  inode_init_always()
	    security_inode_alloc()
	.....
	security_inode_free()
	->destroy_inode()

And we should have this symmetry everywhere.

<thinks for a bit>

Hmmmm - maybe the xfs_iget_cache_miss failure paths where we call
xfs_idestroy() could leak contexts. We should really call xfs_iput()
because we have an initialised linux inode at this point and so
we need to go through destroy_inode(). I'll have a bit more of
a look, but this doesn't seem to account for the huge number of
leaked contexts you reported....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2008-10-17  1:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16  2:06 another problem with latest code drops Lachlan McIlroy
2008-10-16  6:02 ` Dave Chinner
2008-10-16  7:38   ` Lachlan McIlroy
2008-10-16  7:20     ` Dave Chinner
2008-10-16  8:35       ` Lachlan McIlroy
2008-10-16  9:08         ` Christoph Hellwig
2008-10-17  1:13           ` Lachlan McIlroy
2008-10-16 22:29         ` Dave Chinner
2008-10-17  1:17           ` Lachlan McIlroy
2008-10-17  1:21             ` Dave Chinner [this message]
2008-10-17  2:04               ` [PATCH] " Dave Chinner
2008-10-17  2:07                 ` Dave Chinner
2008-10-20  2:37                   ` Lachlan McIlroy
2008-10-20  3:17                     ` Dave Chinner
2008-10-20  4:37                       ` Lachlan McIlroy
2008-10-20  5:29                         ` Dave Chinner
2008-10-20  6:05                           ` Dave Chinner
2008-10-20 21:41                             ` Christoph Hellwig
2008-10-17  3:14                 ` Lachlan McIlroy
2008-10-19  9:10       ` Christoph Hellwig

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=20081017012141.GJ25906@disturbed \
    --to=david@fromorbit.com \
    --cc=lachlan@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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