Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp974229ybx; Thu, 31 Oct 2019 03:56:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqygawhVCHnP/tkZMvtsr2fE7d35BY+BLYgk9+bBbBZFGStr186B3ALAZTbYMaq6004TOdUA X-Received: by 2002:a50:ff19:: with SMTP id a25mr5127091edu.181.1572519394793; Thu, 31 Oct 2019 03:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572519394; cv=none; d=google.com; s=arc-20160816; b=usPgk8CyyplfaF+RWeiD0CfQIumLKJHqNjKvww3jpBsAbdXL3FkHgLND6bjGaTi5wk Kjrw0V6KF/ot9Cw4iB5fJU8ZI4uf5lD4KIUhllCKGa2N7RHvzHuEJASJpIQIYWj5zO0y 6n4eThcyZPtZJT+mP9Cdm+h9xAhhhO3sY1rL6Fn8BRfRbPGOj02I5KAjaANFDqFnAV0Q uQ9H+FuIYDxajIti4W6EeCTmLU0ODeo1Nw7I3qnwIiY0u4qcFWpodpbgTVj7VmyzV1sV JiVMr+CC6PZ1499CkoVuhCxzBA9rsndfAv9AzgqF+vLHPzyiB95wJeuKJ7aMNIS+I1D7 Peug== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=7ysmo+YAkkU9a6PbVTL9NGrp85u/AGCAJbYnFPDyZTI=; b=jTZ5AIhI8Js9HoBSnPuHv7kEAsmtWdnJkykw4rbTc56QAjHMyttRaAvcciFDUx/wlB Etyhw/y5951tfx7NwizPwFtU3VAo4xOu2JMcYsD1X1lhk2+yp+3WHre6GZRhlZVD9LaL deKrkJcn2hKzE8Exeu2Rh/WXS0RQRlaw5R4NBKLXjnToU+g6YAZy/8O9jgi2FUxD92vR 1+HJQwKUfOxZe5RJNwA2j8SH5LAjADbRfs8VmwNRZm5TlC4h01n5THiF+GZrgx1qisax +CZreXV4hBQYoqsr4Syw5JAuDNkf8ygJaqTfWDjBHRte6tzEcu9QURnJ0FVASGAbWuc0 6nig== ARC-Authentication-Results: i=1; mx.google.com; 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 h13si3541252edw.72.2019.10.31.03.56.11; Thu, 31 Oct 2019 03:56:34 -0700 (PDT) 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; 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 S1727409AbfJaKyY (ORCPT + 99 others); Thu, 31 Oct 2019 06:54:24 -0400 Received: from foss.arm.com ([217.140.110.172]:47008 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbfJaKyY (ORCPT ); Thu, 31 Oct 2019 06:54:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B7B11F1; Thu, 31 Oct 2019 03:54:24 -0700 (PDT) Received: from [172.20.53.248] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7465B3F719; Thu, 31 Oct 2019 03:54:20 -0700 (PDT) Subject: Re: NULL pointer dereference in pick_next_task_fair From: Valentin Schneider To: Ram Muthiah , Quentin Perret Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, aaron.lwe@gmail.com, mingo@kernel.org, pauld@redhat.com, jdesfossez@digitalocean.com, naravamudan@digitalocean.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, kernel-team@android.com, john.stultz@linaro.org References: <20191028174603.GA246917@google.com> <20191029113411.GP4643@worktop.programming.kicks-ass.net> <20191029115000.GA11194@google.com> <75e99374-0bd6-a7d7-581e-9360a1f90103@arm.com> Message-ID: <8d8fe4e9-1905-cde1-9ced-0a860e5a961b@arm.com> Date: Thu, 31 Oct 2019 11:54:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <75e99374-0bd6-a7d7-581e-9360a1f90103@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/10/2019 02:33, Valentin Schneider wrote: > For wakeups, select_task_rq_fair() can only ever pick prev_cpu or this_cpu > since there are no sched domains. I don't see many candidates that could > wakeup on a secondary (thus have non-zero this_cpu) this early there. Perhaps > the smpboot threads, but from a quick look they are first created *after* > sched_init_smp(), so they couldn't exist during (boot-time) secondary bringup. Scratch that, I can't read. The registration is done in early initcalls (and we have the unpark in the secondary bringup anyway), so when we spool up the secondaries we'll get wakeups for the smpboot threads. AFAIR only softirqd and cpuhp are CFS, but while this satisfied some of my curiosity this doesn't seem super helpful on its own. > Seems to be the same for IRQ threads (and they're setscheduler'd to FIFO > anyway). > > So now I'm even more curious as to what CFS task could be enqueued on a > secondary CPU rq before sched_init_smp(). Have you been sending stuff to space > without any shielding lately? >