[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190205100415.GC2133@nanopsycho>
Date: Tue, 5 Feb 2019 11:04:15 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Vlad Buslov <vladbu@...lanox.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
davem@...emloft.net, ast@...nel.org, daniel@...earbox.net
Subject: Re: [PATCH net-next v3 06/16] net: sched: protect filter_chain list
with filter_chain_lock mutex
Mon, Feb 04, 2019 at 01:32:51PM CET, vladbu@...lanox.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@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>
Powered by blists - more mailing lists