[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080909.212426.193696271.davem@davemloft.net>
Date: Tue, 09 Sep 2008 21:24:26 -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: Herbert Xu <herbert@...dor.apana.org.au>
Date: Wed, 10 Sep 2008 14:22:47 +1000
> On Tue, Sep 09, 2008 at 09:06:54PM -0700, David Miller wrote:
> > @@ -120,7 +120,6 @@ extern struct mutex xfrm_cfg_mutex;
> > /* Full description of state of transformer. */
> > struct xfrm_state
> > {
> > - struct list_head all;
> > union {
> > struct list_head gclist;
> > struct hlist_node bydst;
>
> This union now needs to move across to bysrc or byspi since bydst
> needs to be preserved for walking even after a node is added to
> the GC.
That would explain the crash I just got :)
> > @@ -566,7 +564,6 @@ int __xfrm_state_delete(struct xfrm_state *x)
> > x->km.state = XFRM_STATE_DEAD;
> > spin_lock(&xfrm_state_lock);
> > x->lastused = xfrm_state_walk_ongoing;
> > - list_del_rcu(&x->all);
> > hlist_del(&x->bydst);
>
> We need hlist_del_rcu on bydst for the same reason.
Ok, gotcha.
> This is a bug in the original patch. When we get an error on
> the very last node we'll lose that node instead of dumping it
> later. I wonder if we could just get rid of last altogether...
I'll take a look at this too after I resolve and test the above
issues.
Thanks.
--
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