[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnP8ZaVt6swzFY_aa_FTigA=SHKQDMERDS4398yDcUjYBTYKA@mail.gmail.com>
Date: Fri, 1 Dec 2023 10:05:12 -0800
From: Marcelo Ricardo Leitner <mleitner@...hat.com>
To: Pedro Tammela <pctammela@...atatu.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us
Subject: Re: [PATCH net-next v2 3/4] net/sched: act_api: stop loop over ops
array on NULL in tcf_action_init
On Fri, Dec 01, 2023 at 02:50:14PM -0300, Pedro Tammela wrote:
> - for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
> - if (ops[i])
> - module_put(ops[i]->owner);
> - }
> + for (i = 0; i < TCA_ACT_MAX_PRIO && ops[i]; i++)
> + module_put(ops[i]->owner);
> return err;
Seems you thought it would have been an abuse to use
tcf_act_for_each_action() here as well, which I can understand.
Powered by blists - more mailing lists