Skip to contentSkip to conversation

fix oops in fs audit patch

PATCH New Amy Griffis 1 participant 1 message Jun 1, 2006 Audit

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix oops in fs audit patch

Fix bad list management in audit_inotify_unregister().

Al, please fold in with latest filesystem auditing patch 46c438b705c31284f31c64a0d18bf3bd6c62cde3.

kernel/auditfilter.c +3 -2
index f993842..7609694 100644
@@ -822,9 +822,10 @@ static inline void audit_remove_parent_w
  * Generates an IN_IGNORED event. */
 static void audit_inotify_unregister(struct list_head *in_list)
 {
-	struct audit_parent *p;
+	struct audit_parent *p, *n;
 
-	list_for_each_entry(p, in_list, ilist) {
+	list_for_each_entry_safe(p, n, in_list, ilist) {
+		list_del(&p->ilist);
 		inotify_rm_watch(audit_ih, &p->wdata);
 		/* the put matching the get in audit_do_del_rule() */
 		put_inotify_watch(&p->wdata);