public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+c4c6c3dc10cc96bcf723@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Test
Date: Mon, 27 May 2024 05:29:25 -0700	[thread overview]
Message-ID: <000000000000eef89706196eaad4@google.com> (raw)
In-Reply-To: <00000000000089427c0614c18cf4@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Test
Author: radoslaw.zielonek@gmail.com

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 71b1543c83d65af8215d7558d70fc2ecbee77dcf

---
 net/sched/sch_taprio.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index a0d54b422186..41add4a1d407 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -44,6 +44,8 @@ static struct static_key_false taprio_have_working_mqprio;
 	(TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST | TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD)
 #define TAPRIO_FLAGS_INVALID U32_MAX
 
+#define TAPRIO_MAX_NUM_SCHEDULES_BEFORE_NOW 10
+
 struct sched_entry {
 	/* Durations between this GCL entry and the GCL entry where the
 	 * respective traffic class gate closes
@@ -62,6 +64,8 @@ struct sched_entry {
 	u32 gate_mask;
 	u32 interval;
 	u8 command;
+	/* Used to skip some cycles to prevent other tasks from starving */
+	u8 num_schedules_before_now;
 };
 
 struct sched_gate_list {
@@ -111,6 +115,9 @@ struct __tc_taprio_qopt_offload {
 	struct tc_taprio_qopt_offload offload;
 };
 
+static void setup_txtime(struct taprio_sched *q,
+			 struct sched_gate_list *sched, ktime_t base);
+
 static void taprio_calculate_gate_durations(struct taprio_sched *q,
 					    struct sched_gate_list *sched)
 {
@@ -919,6 +926,7 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer)
 	struct sched_entry *entry, *next;
 	struct Qdisc *sch = q->root;
 	ktime_t end_time;
+	ktime_t basenow;
 	int tc;
 
 	spin_lock(&q->current_entry_lock);
@@ -977,6 +985,23 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer)
 	taprio_set_budgets(q, oper, next);
 
 first_run:
+	basenow = ktime_get();
+	if (ktime_before(end_time, basenow))
+	{
+		next->num_schedules_before_now++;
+		if (next->num_schedules_before_now >= TAPRIO_MAX_NUM_SCHEDULES_BEFORE_NOW)
+		{
+			end_time = ktime_add_ns(basenow, oper->cycle_time);
+			next->end_time = end_time;
+			next->num_schedules_before_now = 0;
+			setup_txtime(q, oper, basenow);
+		}
+	}
+	else
+	{
+		next->num_schedules_before_now = 0;
+	}
+
 	rcu_assign_pointer(q->current_entry, next);
 	spin_unlock(&q->current_entry_lock);
 
@@ -1074,6 +1099,7 @@ static int parse_sched_entry(struct taprio_sched *q, struct nlattr *n,
 	}
 
 	entry->index = index;
+	entry->num_schedules_before_now = 0;
 
 	return fill_sched_entry(q, tb, entry, extack);
 }
-- 
2.43.0



  reply	other threads:[~2024-05-27 12:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  0:16 [syzbot] [mm?] INFO: rcu detected stall in sys_clone (8) syzbot
2024-05-27 12:29 ` syzbot [this message]
2024-07-03  7:26 ` [syzbot] Test syzbot
  -- strict thread matches above, loose matches on Subject: below --
2024-09-23 15:46 [syzbot] [net?] possible deadlock in gtp_encap_enable_socket syzbot
2024-10-01  0:57 ` [syzbot] test syzbot
2024-09-22 17:46 [syzbot] [net?] KMSAN: kernel-infoleak in move_addr_to_user (7) syzbot
2024-11-03 19:27 ` [syzbot] test syzbot
2024-05-14 16:19 [syzbot] [ntfs3?] UBSAN: array-index-out-of-bounds in decompress_lznt syzbot
2024-07-01 21:55 ` [syzbot] test syzbot
2024-05-12  9:19 [syzbot] [mm?] INFO: rcu detected stall in validate_mm (3) syzbot
2024-07-03  7:32 ` [syzbot] Test syzbot
2024-07-03  8:24 ` syzbot
2024-04-15  1:54 [syzbot] [input?] WARNING in bcm5974_start_traffic/usb_submit_urb (2) syzbot
2024-04-15 10:18 ` [syzbot] test syzbot
2024-04-14  6:05 [syzbot] [bluetooth?] WARNING in hci_conn_set_handle syzbot
2024-04-15  9:33 ` [syzbot] test syzbot
2024-04-09 22:42 [syzbot] [ntfs3?] WARNING in do_open_execat (2) syzbot
2024-04-15  5:22 ` [syzbot] Test syzbot
2023-11-19 12:31 syzbot
2023-11-17  5:01 [syzbot] [kvm?] WARNING in kvm_mmu_notifier_invalidate_range_start (3) syzbot
2023-11-17 10:55 ` [syzbot] Test syzbot
2023-11-16 11:09 [syzbot] [kernel?] inconsistent lock state in ptrace_attach syzbot
2023-11-17 13:51 ` [syzbot] Test syzbot
2023-11-16 11:08 [syzbot] [cgroups?] possible deadlock in cgroup_free syzbot
2023-11-17 10:58 ` [syzbot] Test syzbot
2023-11-08 12:38 [syzbot] [wireless?] [net?] WARNING in ieee80211_rfkill_poll syzbot
2023-11-15  6:33 ` [syzbot] Test syzbot
2023-11-03 23:11 [syzbot] [bpf?] [net?] BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready syzbot
2023-11-13 11:16 ` [syzbot] test syzbot
2023-10-26 18:32 [syzbot] [bpf?] [net?] BUG: unable to handle kernel NULL pointer dereference in sk_msg_recvmsg syzbot
2023-11-06 13:35 ` [syzbot] Test syzbot
2023-10-16 17:01 [syzbot] [usb?] UBSAN: array-index-out-of-bounds in usbhid_parse syzbot
2023-11-17 14:23 ` [syzbot] Test syzbot
2023-10-05 19:47 [syzbot] [ntfs3?] WARNING in attr_data_get_block (3) syzbot
2023-11-19 11:27 ` [syzbot] test syzbot
2023-09-25  5:15 [syzbot] [bluetooth?] possible deadlock in hci_dev_do_close syzbot
2023-11-15  5:18 ` [syzbot] test syzbot
2023-09-24  7:49 [syzbot] [mm?] [hfs?] KASAN: slab-out-of-bounds Read in generic_perform_write syzbot
2023-11-17 14:24 ` [syzbot] Test syzbot
2023-09-16  1:22 [syzbot] [dri?] WARNING in drm_gem_object_handle_put_unlocked syzbot
2023-11-15  6:33 ` [syzbot] Test syzbot
2023-09-11 13:35 [syzbot] [ext4?] WARNING in ext4_discard_allocated_blocks syzbot
2023-11-17 14:17 ` [syzbot] Test syzbot
2023-08-19 10:47 [syzbot] [ntfs3?] WARNING in do_symlinkat (2) syzbot
2023-11-28 17:38 ` [syzbot] Test syzbot
2023-07-11  1:53 [syzbot] [bpf?] [reiserfs?] WARNING: locking bug in corrupted (2) syzbot
2023-11-17 14:27 ` [syzbot] Test syzbot
2022-10-21  4:45 [syzbot] UBSAN: array-index-out-of-bounds in diWrite syzbot
2023-11-02 15:02 ` [syzbot] test syzbot
2023-11-03  3:12 ` syzbot
2023-11-03  7:18 ` syzbot
2023-11-03  7:29 ` syzbot
2022-02-10 18:27 [syzbot] general protection fault in l2cap_chan_timeout (3) syzbot
2023-11-06 13:01 ` [syzbot] Test 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=000000000000eef89706196eaad4@google.com \
    --to=syzbot+c4c6c3dc10cc96bcf723@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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