--- linux-2.4.24-rsbac-v1.2.2/fs/namespace.c.sik	2004-01-05 15:42:31.000000000 +0100
+++ linux-2.4.24-rsbac-v1.2.2/fs/namespace.c	2004-01-12 11:38:23.000000000 +0100
@@ -1175,6 +1175,9 @@
             error = -EPERM;
             goto out1;
           }
+
+        /* Make the new root's cached rsbac.dat dentry be put to free the old root's dcache */
+        rsbac_free_dat_dentries();
         #endif
 
 	read_lock(&current->fs->lock);
--- linux-2.4.24-rsbac-v1.2.2/rsbac/data_structures/aci_data_structures.c.sik	2004-01-05 15:43:33.000000000 +0100
+++ linux-2.4.24-rsbac-v1.2.2/rsbac/data_structures/aci_data_structures.c	2004-01-12 11:40:31.000000000 +0100
@@ -7454,6 +7454,13 @@
 
 /*    lock_kernel(); */
 
+    sys_close(0);
+    sys_close(1);
+    sys_close(2);
+#ifdef CONFIG_RSBAC_INIT_DELAY
+    reparent_to_init();
+#endif
+
 #ifdef CONFIG_RSBAC_DEBUG
     if(rsbac_debug_auto)
       printk(KERN_DEBUG "rsbacd(): Setting auto timer.\n");
@@ -7992,7 +7992,42 @@
       }
 #endif /* CONFIG_RSBAC_AUTO_WRITE */
     return(0);
-  };
+  }
+
+/* On pivot_root, we must unblock the dentry tree of the old root */
+/* by putting all cached rsbac.dat dentries */
+
+int rsbac_free_dat_dentries(void)
+  {
+    u_long flags;
+    struct rsbac_device_list_item_t * device_p;
+
+    if (!rsbac_initialized)
+      {
+        printk(KERN_WARNING "rsbac_free_dat_dentry(): RSBAC not initialized\n");
+        return(-RSBAC_ENOTINITIALIZED);
+      }
+
+    printk(KERN_INFO "rsbac_free_dat_dentry(): freeing dat dir dentries\n");
+
+    /* wait for write access to device_list_head */
+    rsbac_write_lock_irq(&device_list_head.lock, &flags);
+    /* OK, nobody else is working on it... */
+    device_p = device_list_head.head;
+    while(device_p)
+      {
+        if(device_p->rsbac_dir_dentry_p)
+          {
+            dput(device_p->rsbac_dir_dentry_p);
+            device_p->rsbac_dir_dentry_p = NULL;
+          }
+        device_p = device_p->next;
+      }
+    /* allow access */
+    rsbac_write_unlock_irq(&device_list_head.lock, &flags);
+
+    return(0);
+  }
 
 /***************************************************/
 /* We also need some status information...         */
--- linux-2.4.24-rsbac-v1.2.2/include/rsbac/aci.h~	2004-01-05 15:52:24.000000000 +0100
+++ linux-2.4.24-rsbac-v1.2.2/include/rsbac/aci.h	2004-01-12 11:43:36.000000000 +0100
@@ -51,6 +51,10 @@
 extern int rsbac_umount(struct super_block * sb_p, struct dentry * d_covers);
 #endif
 
+/* On pivot_root, we must unblock the dentry tree of the old root */
+/* by putting all cached rsbac.dat dentries */
+int rsbac_free_dat_dentries(void);
+
 /* Some information about the current status is also available */
 extern int rsbac_stats(void);
 
