Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2703115imu; Mon, 19 Nov 2018 04:55:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XkjZbfjKdKdsnsWCReJ6rD0F4bBb/wkV9nTKN0rk/Oq0GsFGkoTl40gc6sDsoTFsmEDzcQ X-Received: by 2002:a17:902:bb98:: with SMTP id m24mr3005741pls.71.1542632135148; Mon, 19 Nov 2018 04:55:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542632135; cv=none; d=google.com; s=arc-20160816; b=ym/NtZ1qmBIKboOhNnOZS8I0HR1TjHEfqPtu77i+grJiKDyrXp4pIbN+SJnW9VtIIK MTAcR+8hG4zQ9H/XhXVCVkRCQyr/CY71lf0EboqbGAU41CF/6RbiFJ3kgCsjIo5CHtaS WLw4sSqJDJ+pVQqO1qdmWprfvFtDgSuvvadwxIYwgxgHso2yAJtjgXGUxgbr5VoTD+uN CabInB9D33mW3n9plj8+QERhVkKJCXdnyvwrGGYSeuxUyJ9Z4xBxPm8OzKbTr6nInS8P Q4cUAwyGIuSjMa/INB1fAkhDF1EAD6zLDrLZY43fl9koDhvoKHYrEU7mmUPXVPZlNtP7 cweQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O9IpEFSYEs2RI8yj3Cm4O1zzyMhTmwKCZ15ewSicOxY=; b=MlblYIS0jrgrZFDPX4rAUqgVUmeviytQrOKL4mNiL0Q1OJ7H8TBmQfrO77KC3W2ElT vUuvYXqA9Ho3mL3qayhJqERY7gh9+EjnRlzy42OGpJh7ey+IRh2oQ478EsbimpHuO7i9 CYxxV0xydVTZnVNKHa9L1efJJJXsfyQVheMAvoxW6qfOXGAaH961+xD6i9wPyNN3drkm PxDcwA9kdLgtQ6zhXKU6pwkkra5DN8FonCXOxa/Lv19ftS50iMlpewl5tGVdZLM0usSn qx4utzTPYVHztnjIwDBZmsV81026VKlAbaBrF8nHTehK4UK9x/YG1pyQ8kAEkq6x1uSK oGpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="QwGJd/WP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186si6827068pgi.424.2018.11.19.04.55.20; Mon, 19 Nov 2018 04:55:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="QwGJd/WP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728944AbeKSXQ1 (ORCPT + 99 others); Mon, 19 Nov 2018 18:16:27 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55076 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbeKSXQ1 (ORCPT ); Mon, 19 Nov 2018 18:16:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=O9IpEFSYEs2RI8yj3Cm4O1zzyMhTmwKCZ15ewSicOxY=; b=QwGJd/WPcYkBA1YJE03RetVHr 9llnXdegiSAKfIjqQ1gUSz4hPazFFG4y54s34Hve0yKzbN3+ZfLxWBM3LQy5K+cR9xzRZL8VyLa19 IVEiNiF21rwDWBtjt+MefhQgUyn0PPsNG6XCHgpEZAAWzAqZLait19sVSPa3KYb3V9u0+rmR473JE 1VakGPV8r/4cHfXzLT3UZh5jnYm23spdEnSL3d/vpEv5c4d9R8XF5/e5T6kdHxMk1HeAH0vXBur8a OWXOzSj1nyRPNTis0oV87aBhCMPkUyrFrmzT5+yBUgX6CKOQ6vL31UCSldKADcUh2ejLwMKos3AR3 GWy1Ep7AQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOj2g-0007tl-WA; Mon, 19 Nov 2018 12:52:43 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0C78220298BFC; Mon, 19 Nov 2018 13:52:41 +0100 (CET) Date: Mon, 19 Nov 2018 13:52:41 +0100 From: Peter Zijlstra To: luca abeni Cc: Thomas Gleixner , syzbot , Borislav Petkov , "H. Peter Anvin" , LKML , Andy Lutomirski , mingo@redhat.com, syzkaller-bugs@googlegroups.com, x86@kernel.org, Juri Lelli , Daniel Bristot de Oliveira Subject: Re: WARNING in enqueue_task_dl Message-ID: <20181119125241.GC9761@hirez.programming.kicks-ass.net> References: <000000000000b5e346057af4da06@google.com> <20181119130718.69eddf46@luca64> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181119130718.69eddf46@luca64> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 19, 2018 at 01:07:18PM +0100, luca abeni wrote: > > On Sun, 18 Nov 2018, syzbot wrote: > > > WARNING: CPU: 1 PID: 6351 at kernel/sched/deadline.c:628 > > > enqueue_task_dl+0x22da/0x38a0 kernel/sched/deadline.c:1504 > > Here, it looks like a task is invoking sched_setattr() to become > SCHED_DEADLINE when dl_boosted is set... > > Is this possible / correct? Possible, clearly. Correct, only in so far as that it is not a malformed program, but it is very poor design to actually trigger this (of course the fuzzer doesn't care about that). > If this (sched_setattr() with dl_boosted set) should not be possible, > then we have a bug that we need to investigate... > > Otherwise, I suspect we can just remove the WARN_ON at line 628 of > deadline.c I wonder why we put that WARN in there to begin with... git-blame gives us: 98b0a8578050 ("sched/deadline: Remove useless parameter from setup_new_dl_entity()") So the problem seems to be that if we're boosted, we should maybe not be using our own (newly set) parameters, but those of the donor task. Specifically, our 'suboptimal' deadline inheritance scheme 'requires' us to use the inherited deadline, not our own. So in that respect I think the WARN is valid, although I'm not sure what, apart from actually finishing that PE patch-set we can do about it just now.