Re: [syzbot] [kernel?] BUG: soft lockup in gate_timer_func

Edward Adam Davis <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
#syz test

diff --git a/net/sched/act_gate.c b/net/sched/act_gate.c
index fdbfcaa3e2ab..6b8adfbf9c2d 100644
--- a/net/sched/act_gate.c
+++ b/net/sched/act_gate.c
@@ -178,6 +178,10 @@ static const struct nla_policy gate_policy[TCA_GATE_MAX + 1] = {
 	[TCA_GATE_CLOCKID]		= { .type = NLA_S32 },
 };
 
+#ifndef __NET_TC_GATE_LIMIT
+#define GATE_ENTRY_INTERVAL_MIN 100
+#endif
+
 static int fill_gate_entry(struct nlattr **tb, struct tcfg_gate_entry *entry,
 			   struct netlink_ext_ack *extack)
 {
@@ -188,7 +192,7 @@ static int fill_gate_entry(struct nlattr **tb, struct tcfg_gate_entry *entry,
 	if (tb[TCA_GATE_ENTRY_INTERVAL])
 		interval = nla_get_u32(tb[TCA_GATE_ENTRY_INTERVAL]);
 
-	if (interval == 0) {
+	if (interval < GATE_ENTRY_INTERVAL_MIN) {
 		NL_SET_ERR_MSG(extack, "Invalid interval for schedule entry");
 		return -EINVAL;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.