[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240530115726.3151-1-hdanton@sina.com>
Date: Thu, 30 May 2024 19:57:26 +0800
From: Hillf Danton <hdanton@...a.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: syzbot <syzbot+a7d2b1d5d1af83035567@...kaller.appspotmail.com>,
edumazet@...gle.com,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
radoslaw.zielonek@...il.com,
syzkaller-bugs@...glegroups.com,
vinicius.gomes@...el.com
Subject: Re: [syzbot] [net?] INFO: rcu detected stall in packet_release
On Thu, 30 May 2024 03:33:25 +0300 Vladimir Oltean <vladimir.oltean@....com>
>
> What is the fact that you submitted only my patch 1/2 for syzbot testing
> supposed to prove? It is the second patch (2/2) that addresses what has
> been reported here;
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
--- x/net/sched/sch_taprio.c
+++ y/net/sched/sch_taprio.c
@@ -1151,11 +1151,6 @@ static int parse_taprio_schedule(struct
list_for_each_entry(entry, &new->entries, list)
cycle = ktime_add_ns(cycle, entry->interval);
- if (!cycle) {
- NL_SET_ERR_MSG(extack, "'cycle_time' can never be 0");
- return -EINVAL;
- }
-
if (cycle < 0 || cycle > INT_MAX) {
NL_SET_ERR_MSG(extack, "'cycle_time' is too big");
return -EINVAL;
@@ -1164,6 +1159,11 @@ static int parse_taprio_schedule(struct
new->cycle_time = cycle;
}
+ if (new->cycle_time < new->num_entries * length_to_duration(q, ETH_ZLEN)) {
+ NL_SET_ERR_MSG(extack, "'cycle_time' is too small");
+ return -EINVAL;
+ }
+
taprio_calculate_gate_durations(q, new);
return 0;
@@ -1848,6 +1848,9 @@ static int taprio_change(struct Qdisc *s
}
q->flags = taprio_flags;
+ /* Needed for length_to_duration() during netlink attribute parsing */
+ taprio_set_picos_per_byte(dev, q);
+
err = taprio_parse_mqprio_opt(dev, mqprio, extack, q->flags);
if (err < 0)
return err;
@@ -1907,7 +1910,6 @@ static int taprio_change(struct Qdisc *s
if (err < 0)
goto free_sched;
- taprio_set_picos_per_byte(dev, q);
taprio_update_queue_max_sdu(q, new_admin, stab);
if (FULL_OFFLOAD_IS_ENABLED(q->flags))
--
Powered by blists - more mailing lists