Fix bad list management in audit_inotify_unregister().
Al, please fold in with latest filesystem auditing patch
46c438b705c31284f31c64a0d18bf3bd6c62cde3.
Signed-off-by: Amy Griffis <amy.griffis(a)hp.com>
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);
Show replies by date