mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Edward Adam Davis <eadavis@qq.com>
Cc: Po.Liu@nxp.com, davem@davemloft.net, edumazet@google.com,
	horms@kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com,
	syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH v3] net/sched: act_gate: Limit the max value for cycletime
Date: Thu, 27 Aug 2026 12:17:51 -0700	[thread overview]
Message-ID: <20260827121751.33dac8aa@kernel.org> (raw)
In-Reply-To: <tencent_FAEDEECDD478AE6DFC2DE96D389440E96A0A@qq.com>

On Tue, 25 Aug 2026 20:13:02 +0800 Edward Adam Davis wrote:
>  static const struct nla_policy gate_policy[TCA_GATE_MAX + 1] = {
>  	[TCA_GATE_PARMS]		=
>  		NLA_POLICY_EXACT_LEN(sizeof(struct tc_gate)),
>  	[TCA_GATE_PRIORITY]		= { .type = NLA_S32 },
>  	[TCA_GATE_ENTRY_LIST]		= { .type = NLA_NESTED },
>  	[TCA_GATE_BASE_TIME]		= { .type = NLA_U64 },
> -	[TCA_GATE_CYCLE_TIME]		= { .type = NLA_U64 },
> +	[TCA_GATE_CYCLE_TIME]		=
> +		NLA_POLICY_FULL_RANGE_SIGNED(NLA_S64, &gate_cycle_time_range),

Why are you changing the type of the attr? S64_MAX is perfectly fine as
range for NLA_U64

>  	[TCA_GATE_CYCLE_TIME_EXT]	= { .type = NLA_U64 },
>  	[TCA_GATE_FLAGS]		= { .type = NLA_U32 },
>  	[TCA_GATE_CLOCKID]		= { .type = NLA_S32 },
> @@ -501,6 +507,7 @@ static int tcf_gate_init(struct net *net, struct nlattr *nla,
>  			cycle = ktime_add_ns(cycle, entry->interval);
>  		cycletime = cycle;
>  	}
> +
>  	p->tcfg_cycletime = cycletime;
>  	p->tcfg_cycletime_ext = cycletime_ext;

Unrelated noise, please pay more attention.

  parent reply	other threads:[~2026-08-27 19:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 16:04 [syzbot] [kernel?] BUG: soft lockup in gate_timer_func syzbot
2026-08-18  4:45 ` Edward Adam Davis
2026-08-18  6:34   ` syzbot
2026-08-18  8:24 ` Edward Adam Davis
2026-08-18  8:50   ` syzbot
2026-08-18  9:37 ` Edward Adam Davis
2026-08-18 10:44   ` syzbot
2026-08-18 10:44 ` [PATCH] net/sched: act_gate: Limit the max value for cycletime Edward Adam Davis
2026-08-22 20:20   ` Jakub Kicinski
2026-08-23  4:07     ` [PATCH v2] " Edward Adam Davis
2026-08-25  8:25       ` Jamal Hadi Salim
2026-08-25  9:01         ` Edward Adam Davis
2026-08-25  9:31           ` Jamal Hadi Salim
2026-08-25 12:08             ` Edward Adam Davis
2026-08-25 12:13               ` [PATCH v3] " Edward Adam Davis
2026-08-27 19:15                 ` Jakub Kicinski
2026-08-27 19:17                 ` Jakub Kicinski [this message]
2026-08-23  3:23 ` [syzbot] [kernel?] BUG: soft lockup in gate_timer_func Edward Adam Davis
2026-08-23  4:07   ` syzbot
2026-08-25 11:32 ` Edward Adam Davis
2026-08-25 12:10   ` syzbot

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=20260827121751.33dac8aa@kernel.org \
    --to=kuba@kernel.org \
    --cc=Po.Liu@nxp.com \
    --cc=davem@davemloft.net \
    --cc=eadavis@qq.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®