public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu•com>
To: John Fastabend <john.fastabend@gmail•com>
Cc: John Fastabend <john.r.fastabend@intel•com>,
	Stephen Hemminger <stephen@networkplumber•org>,
	Eric Dumazet <eric.dumazet@gmail•com>,
	Tom Herbert <therbert@google•com>,
	netdev <netdev@vger•kernel.org>
Subject: Re: locating the 'tc actions' hook
Date: Sat, 03 Aug 2013 07:49:45 -0400	[thread overview]
Message-ID: <51FCEE59.1030402@mojatatu.com> (raw)
In-Reply-To: <51FBFE7B.1010602@gmail.com>



On 13-08-02 02:46 PM, John Fastabend wrote:

> Perhaps another incorrect observation but what protects the tc_actions?
>
> Create a series of actions via 'tc actions' which populates the hash
> table protected by hinfo->lock and also rtnetlink is holding the rtnl
> lock.
>
> Add a filter with index hook to get this action graph attached to a
> filters tcf_exts pointer.
>
> Now for what I think is the race, the classifier will call tcf_exts_exec
> which will call tcf_action_exec() and start walking the actions and
> executing them with the qdisc_lock held.
>
> At the same time tcf_action_destroy() may be called via 'tc actions
> delete' which will only hold the rtnl lock via rtnetlink.
>

One runs in user context and the other in softirq context; so it will
work fine.

cheers,
jamal

  reply	other threads:[~2013-08-03 11:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 21:19 locating the 'tc actions' hook John Fastabend
2013-08-01 11:40 ` Jamal Hadi Salim
2013-08-01 23:18   ` John Fastabend
2013-08-02 18:46     ` John Fastabend
2013-08-03 11:49       ` Jamal Hadi Salim [this message]
2013-08-03 11:47     ` Jamal Hadi Salim
2013-08-05 16:11       ` John Fastabend
2013-08-12  0:55         ` Jamal Hadi Salim

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=51FCEE59.1030402@mojatatu.com \
    --to=jhs@mojatatu$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=john.r.fastabend@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    --cc=therbert@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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