On Wed, May 9, 2018 at 2:18 PM, Roman Mashak <m...@mojatatu.com> wrote:
> The caller calls action's ->init() and passes pointer to "struct tc_action 
> *a",
> which later may initialized to point at the existing action, otherwise
> "struct tc_action *a" is still invalid, and therefore dereferencing it is 
> error.

So technically we just need to check if(exists) before calling
tcf_idr_release(), right?


>
> So checking flags should be done as early as possible, before idr lookups.

In theory, this could break the case of binding an existing action.
But in practice it seems nonsense to pass invalid flags in this case
either, so probably this is okay.

BTW, this should be a candidate for -net and possibly -stable too.

Reply via email to