From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org, john.fastabend@gmail.com,
jhs@mojatatu.com, cwang@twopensource.com
Subject: Re: [Patch net] act_mirred: fix a race condition on mirred_list
Date: Mon, 05 Oct 2015 06:31:12 -0700 (PDT) [thread overview]
Message-ID: <20151005.063112.2276279050001307569.davem@davemloft.net> (raw)
In-Reply-To: <1443724663-27158-1-git-send-email-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.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@twopensource.com>
> Cc: John Fastabend <john.fastabend@gmail.com>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Signed-off-by: Cong Wang <cwang@twopensource.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied.
prev parent reply other threads:[~2015-10-05 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 18:37 [Patch net] act_mirred: fix a race condition on mirred_list Cong Wang
2015-10-01 18:37 ` [Patch net] act_mirred: always release tcf hash Cong Wang
2015-10-05 12:14 ` Jamal Hadi Salim
2015-10-05 13:31 ` David Miller
2015-10-05 11:58 ` [Patch net] act_mirred: fix a race condition on mirred_list Jamal Hadi Salim
2015-10-05 12:07 ` Jamal Hadi Salim
2015-10-05 13:31 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151005.063112.2276279050001307569.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cwang@twopensource.com \
--cc=jhs@mojatatu.com \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).