[PATCH] move audit_dentry_unpin

Timothy R. Chavez tinytim at us.ibm.com
Tue May 17 20:21:18 UTC 2005


Hello,

This patch fixes the error that Loulwa reported was hanging her system.  What 
was happening was that audit_dentry_unpin was being called under the 
protection of the same spinlocks it was trying to hold itself (via the dput() 
it was calling).  To fix this, I moved audit_dentry_unpin outside of the 
spinlocks where it belonged in the first place.

-tim  

--- fs/dcache.c 2005-05-17 13:59:32.968013816 -0500
+++ ../../kernel-2.6.9~working/linux-2.6.9/fs/dcache.c  2005-05-17 
13:43:09.000000000 -0500
@@ -1109,13 +1109,15 @@ out:
                                                                                                                                                                     
 void d_delete(struct dentry * dentry)
 {
+       audit_dentry_unpin(dentry);
+
        /*
         * Are we the only user?
         */
+
        spin_lock(&dcache_lock);
        spin_lock(&dentry->d_lock);
                                                                                                                                                                     
-       audit_dentry_unpin(dentry);
                                                                                                                                                                     
        if (atomic_read(&dentry->d_count) == 1) {
                dentry_iput(dentry);



-tim




More information about the Linux-audit mailing list