From: Valentin Schneider <valentin.schneider@arm.com>
To: Ram Muthiah <rammuthiah@google.com>, Quentin Perret <qperret@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
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
Subject: Re: NULL pointer dereference in pick_next_task_fair
Date: Thu, 31 Oct 2019 23:15:57 +0100 [thread overview]
Message-ID: <c3f65c65-9ed3-5c36-ed5a-e84a38d5aa1b@arm.com> (raw)
In-Reply-To: <CA+CXyWsoW8ann52pcR66ejRmjJ=4QmoaHTRVhb3=ohe0ZDnm-A@mail.gmail.com>
On 30/10/2019 23:50, Ram Muthiah wrote:
> Quentin and I were able to create a setup which reproduces the issue.
>
> Given this, I tried Peter's proposed fix and was still able to reproduce the
> issue unfortunately. Current patch is located here -
> https://android-review.googlesource.com/c/kernel/common/+/1153487
>
> Our mitigation for this issue on the android-mainline branch has been to
> revert 67692435c411 ("sched: Rework pick_next_task() slow-path").
> https://android-review.googlesource.com/c/kernel/common/+/1152564
>
Still no cigar, but one thing to note is that we got a similar splat on a
Juno just yesterday, here it is fed through decode_stacktrace.sh:
[ 22.930829] Mem abort info:
[ 22.935904] ESR = 0x96000006
[ 22.938924] EC = 0x25: DABT (current EL), IL = 32 bits
[ 22.944178] SET = 0, FnV = 0
[ 22.947197] EA = 0, S1PTW = 0
[ 22.950300] Data abort info:
[ 22.953145] ISV = 0, ISS = 0x00000006
[ 22.956937] CM = 0, WnR = 0
[ 22.959870] user pgtable: 4k pages, 48-bit VAs, pgdp=00000009f3905000
[ 22.966243] [0000000000000040] pgd=00000009efa6e003, pud=00000009f41c3003, pmd=0000000000000000
[ 22.974858] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[ 22.980369] Modules linked in: tda998x drm_kms_helper drm crct10dif_ce ip_tables x_tables ipv6 nf_defrag_ipv6
[ 22.990200] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.0-rc2-00001-gaa57157be69f #1
[ 22.998036] Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Oct 19 2018
[ 23.008710] pstate: 60000085 (nZCv daIf -PAN -UAO)
[ 23.013457] pc : set_next_entity (kernel/sched/fair.c:4156)
[ 23.017511] lr : pick_next_task_fair (kernel/sched/fair.c:6829 (discriminator 1))
[ 23.021991] sp : ffff800011a13e10
[ 23.025267] x29: ffff800011a13e10 x28: 0000000000000000
[ 23.030525] x27: ffff800011a13f10 x26: ffff800010c205ec
[ 23.035782] x25: ffff000975cea108 x24: ffff800011789000
[ 23.041038] x23: ffff8000113cf000 x22: ffff000975ce9b80
[ 23.046294] x21: ffff00097ef78d40 x20: ffff000974e21a00
[ 23.051550] x19: 0000000000000000 x18: 0000000000000000
[ 23.056806] x17: 0000000000000000 x16: 0000000000000000
[ 23.062062] x15: 0000000000000000 x14: 00000000000001ad
[ 23.067317] x13: 0000000000000001 x12: 071c71c71c71c71c
[ 23.072573] x11: 0000000000000500 x10: ffff00097ef77dc8
[ 23.077829] x9 : 0000000000000087 x8 : ffff00097ef77de8
[ 23.083085] x7 : 0000000000000003 x6 : 0000000000000000
[ 23.088340] x5 : 0000000000000000 x4 : 0000000000000000
[ 23.093596] x3 : 000000054f6e7800 x2 : 0000000000000000
[ 23.098851] x1 : 0000000000000000 x0 : ffff000974e21a00
[ 23.104107] Call trace:
[ 23.106527] set_next_entity (kernel/sched/fair.c:4156)
[ 23.110236] pick_next_task_fair (kernel/sched/fair.c:6829 (discriminator 1))
[ 23.114377] __schedule (kernel/sched/core.c:3920 kernel/sched/core.c:4039)
[ 23.117828] schedule_idle (kernel/sched/core.c:4165 (discriminator 1))
[ 23.121365] do_idle (./arch/arm64/include/asm/current.h:19 ./arch/arm64/include/asm/preempt.h:31 kernel/sched/idle.c:275)
[ 23.124557] cpu_startup_entry (kernel/sched/idle.c:355 (discriminator 1))
[ 23.128439] secondary_start_kernel (arch/arm64/kernel/smp.c:262)
The faulty line is the very first se dereference in set_next_entity().
As Peter pointed out on IRC, this happens in the 'simple' path (prev is the
idle task).
next prev parent reply other threads:[~2019-10-31 22:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 17:46 NULL pointer dereference in pick_next_task_fair Quentin Perret
2019-10-28 21:49 ` Peter Zijlstra
2019-10-29 11:34 ` Peter Zijlstra
2019-10-29 11:50 ` Quentin Perret
2019-10-30 22:50 ` Ram Muthiah
2019-10-31 1:33 ` Valentin Schneider
2019-10-31 10:54 ` Valentin Schneider
2019-10-31 14:24 ` Valentin Schneider
2019-10-31 22:15 ` Valentin Schneider [this message]
2019-11-06 12:05 ` Peter Zijlstra
2019-11-06 13:08 ` Peter Zijlstra
2019-11-06 15:04 ` Qais Yousef
2019-11-06 16:57 ` Peter Zijlstra
2019-11-06 17:26 ` Qais Yousef
2019-11-06 15:51 ` Kirill Tkhai
2019-11-06 16:54 ` Peter Zijlstra
2019-11-06 17:27 ` Peter Zijlstra
2019-11-07 8:36 ` Kirill Tkhai
2019-11-07 13:26 ` Peter Zijlstra
2019-11-07 15:12 ` Kirill Tkhai
2019-11-07 15:42 ` Peter Zijlstra
2019-11-07 15:53 ` Kirill Tkhai
2019-11-07 15:38 ` Quentin Perret
2019-11-07 18:43 ` Peter Zijlstra
2019-11-07 19:27 ` Quentin Perret
2019-11-07 19:31 ` Peter Zijlstra
2019-11-07 19:42 ` Quentin Perret
2019-11-07 19:29 ` Peter Zijlstra
2019-11-08 11:02 ` Quentin Perret
2019-11-08 11:47 ` Valentin Schneider
2019-11-08 11:58 ` Quentin Perret
2019-11-08 12:00 ` Peter Zijlstra
2019-11-08 12:15 ` Quentin Perret
2019-11-08 12:35 ` Peter Zijlstra
2019-11-08 12:24 ` Peter Zijlstra
2019-11-08 11:55 ` Peter Zijlstra
2019-11-08 12:52 ` Peter Zijlstra
2019-11-07 16:09 ` Qais Yousef
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=c3f65c65-9ed3-5c36-ed5a-e84a38d5aa1b@arm.com \
--to=valentin.schneider@arm.com \
--cc=aaron.lwe@gmail.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jdesfossez@digitalocean.com \
--cc=john.stultz@linaro.org \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=naravamudan@digitalocean.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=rammuthiah@google.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).