From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amy Griffis Subject: [PATCH git] fix oops in fs audit patch Date: Thu, 1 Jun 2006 10:50:03 -0400 Message-ID: <20060601145002.GA1684@zk3.dec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k51EoIoX031982 for ; Thu, 1 Jun 2006 10:50:18 -0400 Received: from ccerelbas04.cce.hp.com (ccerelbas04.cce.hp.com [161.114.21.107]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k51EoGoG001002 for ; Thu, 1 Jun 2006 10:50:16 -0400 Received: from ccerelint01.cce.cpqcorp.net (ccerelint01.cce.cpqcorp.net [16.110.74.103]) by ccerelbas04.cce.hp.com (Postfix) with ESMTP id 95AB13467E for ; Thu, 1 Jun 2006 09:50:03 -0500 (CDT) Received: from dill.zko.hp.com (dill.zko.hp.com [16.116.96.242]) by ccerelint01.cce.cpqcorp.net (Postfix) with ESMTP id 6707334003 for ; Thu, 1 Jun 2006 09:50:03 -0500 (CDT) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com Fix bad list management in audit_inotify_unregister(). Al, please fold in with latest filesystem auditing patch 46c438b705c31284f31c64a0d18bf3bd6c62cde3. Signed-off-by: Amy Griffis diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index f993842..7609694 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -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);