[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190205094238.GB2133@nanopsycho>
Date: Tue, 5 Feb 2019 10:42:38 +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 05/16] net: sched: protect chain template
accesses with block lock
Mon, Feb 04, 2019 at 01:32:50PM CET, vladbu@...lanox.com wrote:
>When cls API is called without protection of rtnl lock, parallel
>modification of chain is possible, which means that chain template can be
>changed concurrently in certain circumstances. For example, when chain is
>'deleted' by new user-space chain API, the chain might continue to be used
>if it is referenced by actions, and can be 're-created' again by user. In
>such case same chain structure is reused and its template is changed. To
>protect from described scenario, cache chain template while holding block
>lock. Introduce standalone tc_chain_notify_delete() function that works
>with cached template values, instead of chains themselves.
>
>Signed-off-by: Vlad Buslov <vladbu@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>
Powered by blists - more mailing lists