Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3378706ybt; Tue, 23 Jun 2020 00:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq/zuF6Qwxk+h+nVbCK9rOSBp2J0hTwbIod7Ff+NmR5+ZLFWRPYHc7Ujyj8ZJrWNmiQ84J X-Received: by 2002:a17:907:1190:: with SMTP id uz16mr5334943ejb.385.1592896933016; Tue, 23 Jun 2020 00:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592896933; cv=none; d=google.com; s=arc-20160816; b=ok08wihviuyNyusGpKDLcUJkHLKCPBZqV8oHK4XiCQO+99hAoPRynuN9bNBY90haMo 68klELK1A9hu8uBZtLt5Pf1+pS+n/pl0QVifNDp0v0AYXTKZHLFdGKCzEyGex9pEc+IH UnUlpFyWdmE3IFA0CfsxsNprsIApd7qrY8AIdm9wajb7zbkflmQy0CSqeh+8iiuVhj/e v+GeKX4mn5YPlhW5/tgEP7HSoDTJzvSUozSUGEv9CB/JPEHToaqt0ewLdKFWfI7qku68 kCauazEaxTB0Nb2JSuwyXuSzm04DVj0YCqEnZhJ2fsdDcqtHrgML5410OrdZMl0YeTBL 3vYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=BWgRMn0nEXPztOa5mScLytsow5+WAStaPpe0x5aFUM8=; b=gqPYlZvSijhuszQEkvKT0TxVLdnPeolcx5ewM2elhrItziaoBuicmcNMIk9Ma/Xv4L 1mULNxwjadLOF+SYsCHlpLFHncfd/77+6/wq8H1g16PG9Ae16QZGajtxu1vAtIE1VhTe 3hOPaYzjUgElEb2ov6XlSB64PQiT2WKfnDNxWIc8NvAYx1RSNBu05GatMuy2pBLOPvQR giF8UBb3DQ8YXqObQVijotfJV0pvDwT8Gb40j9ZuIbAoI45jyZbhEMI+iJ6eJAuOl67r jg7halIRzwr7n4rLXOuHIr2JkEnnQwihnvU2O0KjWtedoJv6gQd9FRFomwhmMMpxOHL/ +vng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si10411319ejg.263.2020.06.23.00.21.50; Tue, 23 Jun 2020 00:22:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731603AbgFWHT7 (ORCPT + 99 others); Tue, 23 Jun 2020 03:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731576AbgFWHTz (ORCPT ); Tue, 23 Jun 2020 03:19:55 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B7BC061573; Tue, 23 Jun 2020 00:19:55 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jndDb-0003Bz-Go; Tue, 23 Jun 2020 09:19:43 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id E6C001C04E3; Tue, 23 Jun 2020 09:19:42 +0200 (CEST) Date: Tue, 23 Jun 2020 07:19:42 -0000 From: "tip-bot2 for Juri Lelli" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/deadline: Initialize dl_boosted Cc: syzbot+5ac8bac25f95e8b221e7@syzkaller.appspotmail.com, Juri Lelli , "Peter Zijlstra (Intel)" , Daniel Wagner , x86 , LKML In-Reply-To: <20200617072919.818409-1-juri.lelli@redhat.com> References: <20200617072919.818409-1-juri.lelli@redhat.com> MIME-Version: 1.0 Message-ID: <159289678269.16989.6418331552606466271.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 5bf857422d6b36b1edff43348054edd3379d069d Gitweb: https://git.kernel.org/tip/5bf857422d6b36b1edff43348054edd3379d069d Author: Juri Lelli AuthorDate: Wed, 17 Jun 2020 09:29:19 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 22 Jun 2020 20:51:05 +02:00 sched/deadline: Initialize dl_boosted syzbot reported the following warning: WARNING: CPU: 0 PID: 6973 at kernel/sched/deadline.c:593 setup_new_dl_entity /kernel/sched/deadline.c:594 [inline] WARNING: CPU: 0 PID: 6973 at kernel/sched/deadline.c:593 enqueue_dl_entity /kernel/sched/deadline.c:1370 [inline] WARNING: CPU: 0 PID: 6973 at kernel/sched/deadline.c:593 enqueue_task_dl+0x1c17/0x2ba0 /kernel/sched/deadline.c:1441 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 6973 Comm: syz-executor366 Not tainted 4.14.133 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack /lib/dump_stack.c:17 [inline] dump_stack+0x138/0x19c /lib/dump_stack.c:53 panic+0x1f2/0x426 /kernel/panic.c:182 __warn.cold+0x2f/0x36 /kernel/panic.c:546 report_bug+0x216/0x254 /lib/bug.c:186 fixup_bug /arch/x86/kernel/traps.c:177 [inline] fixup_bug /arch/x86/kernel/traps.c:172 [inline] do_error_trap+0x1bb/0x310 /arch/x86/kernel/traps.c:295 do_invalid_op+0x1b/0x20 /arch/x86/kernel/traps.c:314 invalid_op+0x1b/0x40 /arch/x86/entry/entry_64.S:960 RIP: 0010:setup_new_dl_entity /kernel/sched/deadline.c:593 [inline] RIP: 0010:enqueue_dl_entity /kernel/sched/deadline.c:1370 [inline] RIP: 0010:enqueue_task_dl+0x1c17/0x2ba0 /kernel/sched/deadline.c:1441 RSP: 0018:ffff888098a3fcd8 EFLAGS: 00010002 RAX: 0000000000000000 RBX: ffffffff87ab2780 RCX: 1ffff1101041413a RDX: 0000000ad48fb497 RSI: ffff8880aee2c518 RDI: ffff8880820a09d0 RBP: ffff888098a3fd48 R08: ffff8880820a09cc R09: ffff8880820a09c0 R10: ffff8880820a073c R11: 0000000000000001 R12: ffff8880820a0700 R13: ffff8880aee2c500 R14: ffff8880820a0978 R15: ffff8880aee2c500 enqueue_task /kernel/sched/core.c:762 [inline] __sched_setscheduler+0xd17/0x2510 /kernel/sched/core.c:4227 sched_setattr /kernel/sched/core.c:4285 [inline] SYSC_sched_setattr /kernel/sched/core.c:4456 [inline] SyS_sched_setattr+0x1f8/0x300 /kernel/sched/core.c:4435 do_syscall_64+0x1e8/0x640 /arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x446749 RSP: 002b:00007ff022092db8 EFLAGS: 00000246 ORIG_RAX: 000000000000013a RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 0000000000446749 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000000 RBP: 00000000006dbc30 R08: 00007ff022093700 R09: 0000000000000000 R10: 00007ff022093700 R11: 0000000000000246 R12: 00000000006dbc3c R13: 00007ffdbf86bf7f R14: 00007ff0220939c0 R15: 0000000000000000 This happens because dl_boosted flag is currently not initialized by __dl_clear_params() (unlike the other flags) and setup_new_dl_entity() finds complains about it. Initialize dl_boosted to 0. Fixes: 2d3d891d3344 ("sched/deadline: Add SCHED_DEADLINE inheritance logic") Reported-by: syzbot+5ac8bac25f95e8b221e7@syzkaller.appspotmail.com Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Tested-by: Daniel Wagner Link: https://lkml.kernel.org/r/20200617072919.818409-1-juri.lelli@redhat.com --- kernel/sched/deadline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 504d2f5..f63f337 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -2692,6 +2692,7 @@ void __dl_clear_params(struct task_struct *p) dl_se->dl_bw = 0; dl_se->dl_density = 0; + dl_se->dl_boosted = 0; dl_se->dl_throttled = 0; dl_se->dl_yielded = 0; dl_se->dl_non_contending = 0;