[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080909.215213.231335592.davem@davemloft.net>
Date: Tue, 09 Sep 2008 21:52:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: timo.teras@....fi, netdev@...r.kernel.org
Subject: Re: xfrm_state locking regression...
From: David Miller <davem@...emloft.net>
Date: Tue, 09 Sep 2008 21:48:29 -0700 (PDT)
> The list iteration is:
>
> list_for_each_entry_safe(x, tmp, &xfrm_state_gc_leftovers, gclist) {
> if ((long)(x->lastused - completed) > 0)
> break;
> xfrm_state_gc_destroy(x);
> }
>
> And xfrm_state_gc_destroy() doesn't do a list_del(&x->gclist) or similar.
I'm now testing the following fix:
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index aaafcee..abbe270 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -423,6 +423,7 @@ static void xfrm_state_gc_task(struct work_struct *data)
list_for_each_entry_safe(x, tmp, &xfrm_state_gc_leftovers, gclist) {
if ((long)(x->lastused - completed) > 0)
break;
+ list_del(&x->gclist);
xfrm_state_gc_destroy(x);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists