[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20151005.063112.2276279050001307569.davem@davemloft.net>
Date: Mon, 05 Oct 2015 06:31:12 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, john.fastabend@...il.com, jhs@...atatu.com,
cwang@...pensource.com
Subject: Re: [Patch net] act_mirred: fix a race condition on mirred_list
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Thu, 1 Oct 2015 11:37:42 -0700
> After commit 1ce87720d456 ("net: sched: make cls_u32 lockless")
> we began to release tc actions in a RCU callback. However,
> mirred action relies on RTNL lock to protect the global
> mirred_list, therefore we could have a race condition
> between RCU callback and netdevice event, which caused
> a list corruption as reported by Vinson.
>
> Instead of relying on RTNL lock, introduce a spinlock to
> protect this list.
>
> Note, in non-bind case, it is still called with RTNL lock,
> therefore should disable BH too.
>
> Reported-by: Vinson Lee <vlee@...pensource.com>
> Cc: John Fastabend <john.fastabend@...il.com>
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: Cong Wang <cwang@...pensource.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied.
--
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