From: Jakub Kicinski <kuba@kernel.org>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Eric Dumazet <edumazet@google.com>,
Christoph Paasch <cpaasch@apple.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net/sched: sch_fq: fix integer overflow of "credit"
Date: Mon, 17 Apr 2023 19:30:31 -0700 [thread overview]
Message-ID: <20230417193031.3ab4ee2a@kernel.org> (raw)
In-Reply-To: <a5288a1f4b69eb2da3e704d0e1ff082489432d25.1681728988.git.dcaratti@redhat.com>
On Mon, 17 Apr 2023 13:02:40 +0200 Davide Caratti wrote:
> + u32 initial_quantum = nla_get_u32(tb[TCA_FQ_INITIAL_QUANTUM]);
> +
> + if (initial_quantum <= INT_MAX) {
> + q->initial_quantum = initial_quantum;
> + } else {
> + NL_SET_ERR_MSG_MOD(extack, "invalid initial quantum");
> + err = -EINVAL;
> + }
Please set the right policy in fq_policy[] instead.
next prev parent reply other threads:[~2023-04-18 2:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 11:02 [PATCH net] net/sched: sch_fq: fix integer overflow of "credit" Davide Caratti
2023-04-17 11:16 ` Eric Dumazet
2023-04-18 2:30 ` Jakub Kicinski [this message]
2023-04-18 10:26 ` Eric Dumazet
2023-04-18 14:43 ` Jakub Kicinski
2023-04-18 15:03 ` Davide Caratti
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=20230417193031.3ab4ee2a@kernel.org \
--to=kuba@kernel.org \
--cc=cpaasch@apple.com \
--cc=dcaratti@redhat.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--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).