All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Cong Wang <xiyou.wangcong@gmail.com>, netdev@vger.kernel.org
Cc: John Fastabend <john.fastabend@gmail.com>,
	Cong Wang <cwang@twopensource.com>
Subject: Re: [Patch net] act_mirred: fix a race condition on mirred_list
Date: Mon, 5 Oct 2015 08:07:28 -0400	[thread overview]
Message-ID: <56126800.2030600@mojatatu.com> (raw)
In-Reply-To: <561265EC.6050906@mojatatu.com>


Never mind. Mirred is speacial because it points to other netdevs.
So:

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Thanks Cong.

cheers,
jamal

On 10/05/15 07:58, Jamal Hadi Salim wrote:
> Hi Cong,
>
> I am wondering if making the bindcount or refcount atomic would help?
> How does this bug get created? i.e the RTNL is still around.
> Why is this specific to mirred only?
>
> cheers,
> jamal
>
>
> On 10/01/15 14:37, Cong Wang wrote:
>> 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.
>>

  reply	other threads:[~2015-10-05 12:07 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 [this message]
2015-10-05 13:31 ` David Miller

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=56126800.2030600@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=cwang@twopensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.