Re: [PATCH 4/6] IMA: only allocate iint when needed

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Al Viro
Date: Tuesday, October 19, 2010 - 8:53 pm

On Tue, Oct 19, 2010 at 06:58:33PM -0400, Eric Paris wrote:

OK, I'm really confused.  Could you explain what's going on with refcounts
now?  AFAICS, you allocate them in process_measurement() now and they live
until the inode is torn down.  Fine by me.  However
	* why bother with bumping refcount in ima_file_free()?  It's not going
to die until we free the inode, for fsck sake...
	* i_mutex is a damn strange choice for protecting your write counter
	* for that matter, why bother with refcount at all?  What could
hold a reference to that sucker without holding a reference to struct inode?
I don't see anything of that sort, other that delayed freeing that'll hold
the only remaining pointer to iint until the callback where it'll promptly
drop it.

And while we are at it, you are forcing a hash lookup on _every_ _damn_
close(2) of a regular file.  How about marking the inode as ima-infested
so that it wouldn't bother?  For that matter, this "final writer" logics
needs explanation as well...
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 4/6] IMA: only allocate iint when needed, Eric Paris, (Tue Oct 19, 3:58 pm)
Re: [PATCH 4/6] IMA: only allocate iint when needed, Al Viro, (Tue Oct 19, 8:53 pm)