[RFC][PATCH] (#6 U1) the latest incarnation

Stephen Smalley sds at tycho.nsa.gov
Thu Mar 24 16:42:27 UTC 2005


On Thu, 2005-03-24 at 10:36 -0600, Timothy R. Chavez wrote:
> On Thursday 24 March 2005 10:19 am, Stephen Smalley wrote:
> > On Thu, 2005-03-24 at 10:03 -0600, Timothy R. Chavez wrote:
> > > No testing on SMP as of right now, I'll get right on this right now.
> >
> > In audit_attach_watch(), you call audit_wentry_fetch_lock() which takes
> > read lock of the parent while holding the write lock on the entry.  What
> > if dentry->d_parent == dentry, i.e. root inode of a filesystem?
> 
> Funny you mentioned this.  Right after you told me about the deadlock you were 
> getting, I went and looked at this function, and noticed the same thing.  I'm 
> now testing for this case.

Why do you need to take the write lock on the entry prior to calling
audit_wentry_fetch_lock anyway (vs. after)?  
 
-- 
Stephen Smalley <sds at tycho.nsa.gov>
National Security Agency




More information about the Linux-audit mailing list