From: Jiri Pirko <jiri@resnulli.us>
To: Vlad Buslov <vladbu@mellanox.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, davem@davemloft.net, ast@kernel.org,
daniel@iogearbox.net
Subject: Re: [PATCH net-next v3 06/16] net: sched: protect filter_chain list with filter_chain_lock mutex
Date: Tue, 5 Feb 2019 11:04:15 +0100 [thread overview]
Message-ID: <20190205100415.GC2133@nanopsycho> (raw)
In-Reply-To: <20190204123301.4223-7-vladbu@mellanox.com>
Mon, Feb 04, 2019 at 01:32:51PM CET, vladbu@mellanox.com wrote:
>Extend tcf_chain with new filter_chain_lock mutex. Always lock the chain
>when accessing filter_chain list, instead of relying on rtnl lock.
>Dereference filter_chain with tcf_chain_dereference() lockdep macro to
>verify that all users of chain_list have the lock taken.
>
>Rearrange tp insert/remove code in tc_new_tfilter/tc_del_tfilter to execute
>all necessary code while holding chain lock in order to prevent
>invalidation of chain_info structure by potential concurrent change. This
>also serializes calls to tcf_chain0_head_change(), which allows head change
>callbacks to rely on filter_chain_lock for synchronization instead of rtnl
>mutex.
>
>Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
next prev parent reply other threads:[~2019-02-05 10:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 12:32 [PATCH net-next v3 00/16] Refactor classifier API to work with chain/classifiers without rtnl lock Vlad Buslov
2019-02-04 12:32 ` [PATCH net-next v3 01/16] net: sched: protect block state with mutex Vlad Buslov
2019-02-04 15:23 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 02/16] net: sched: refactor tc_ctl_chain() to use block->lock Vlad Buslov
2019-02-04 16:21 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 03/16] net: sched: protect block->chain0 with block->lock Vlad Buslov
2019-02-04 16:30 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 04/16] net: sched: traverse chains in block with tcf_get_next_chain() Vlad Buslov
2019-02-05 9:35 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 05/16] net: sched: protect chain template accesses with block lock Vlad Buslov
2019-02-05 9:42 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 06/16] net: sched: protect filter_chain list with filter_chain_lock mutex Vlad Buslov
2019-02-05 10:04 ` Jiri Pirko [this message]
2019-02-04 12:32 ` [PATCH net-next v3 07/16] net: sched: introduce reference counting for tcf_proto Vlad Buslov
2019-02-05 11:22 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 08/16] net: sched: traverse classifiers in chain with tcf_get_next_proto() Vlad Buslov
2019-02-05 13:07 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 09/16] net: sched: refactor tp insert/delete for concurrent execution Vlad Buslov
2019-02-05 13:08 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 10/16] net: sched: prevent insertion of new classifiers during chain flush Vlad Buslov
2019-02-05 13:08 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 11/16] net: sched: track rtnl lock status when validating extensions Vlad Buslov
2019-02-05 13:09 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 12/16] net: sched: extend proto ops with 'put' callback Vlad Buslov
2019-02-05 13:15 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 13/16] net: sched: extend proto ops to support unlocked classifiers Vlad Buslov
2019-02-05 13:29 ` Jiri Pirko
2019-02-04 12:32 ` [PATCH net-next v3 14/16] net: sched: add flags to Qdisc class ops struct Vlad Buslov
2019-02-05 13:29 ` Jiri Pirko
2019-02-04 12:33 ` [PATCH net-next v3 15/16] net: sched: refactor tcf_block_find() into standalone functions Vlad Buslov
2019-02-05 13:30 ` Jiri Pirko
2019-02-04 12:33 ` [PATCH net-next v3 16/16] net: sched: unlock rules update API Vlad Buslov
2019-02-05 13:31 ` Jiri Pirko
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=20190205100415.GC2133@nanopsycho \
--to=jiri@resnulli.us \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=vladbu@mellanox.com \
--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).