linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Kaia Yadira <hypericumperforatum4444@gmail.com>,
	kvartet <xyru1999@gmail.com>
Cc: fweisbec@gmail.com, tglx@linutronix.de, mingo@kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	sunhao.th@gmail.com, syzkaller <syzkaller@googlegroups.com>
Subject: Re: KCSAN: data-race in tick_nohz_stop_tick / tick_sched_timer
Date: Tue, 11 Jan 2022 14:49:36 +0100	[thread overview]
Message-ID: <CACT4Y+ZxnG0sLhqn4uw6ueAUsA4cNZJh0_6eES6C45u9jW-4Pw@mail.gmail.com> (raw)
In-Reply-To: <CACDmwr_b0Z6JK2M6i6RZ4Qg3wb1uqG0NrybQ9mR2iw5QJT8XoA@mail.gmail.com>

On Tue, 11 Jan 2022 at 14:41, Kaia Yadira
<hypericumperforatum4444@gmail.com> wrote:
>
> Hello,

Hi Kaia, kvartet,

You started sending similarly looking reports around the same time.
Please share what you are doing/why and what's your goal? The issue is
that some of these reports may need some pre-moderation before dumping
onto kernel mailing lists.


> When using Syzkaller to fuzz the latest Linux kernel, the following
> crash was triggered.
>
> HEAD commit: a7904a538933 Linux 5.16-rc6
> git tree: upstream
> console output: KCSAN: data-race in tick_nohz_stop_tick / tick_nohz_stop_tick
> kernel config: https://paste.ubuntu.com/p/QB39MJKWKb/plain/
> Syzlang reproducer: https://paste.ubuntu.com/p/T25kYMrytM/plain/
>
> If you fix this issue, please add the following tag to the commit:
>
> Reported-by: Hypericum <hypericumperforatum4444@gmail.com>
>
> I think there are two threads visiting the variable tick_do_timer_cpu
> at kernel/time/tick-sched.c:191 and 872 without locking.
>
> reproducer log: https://paste.ubuntu.com/p/942c3QpFDJ/plain/
> report:
> ==================================================================
> BUG: KCSAN: data-race in tick_nohz_stop_tick / tick_sched_timer
>
> write to 0xffffffff85ebf1e0 of 4 bytes by task 0 on cpu 6:
>  tick_nohz_stop_tick+0xa5/0x410 kernel/time/tick-sched.c:873
>  __tick_nohz_idle_stop_tick kernel/time/tick-sched.c:1062 [inline]
>  tick_nohz_idle_stop_tick+0xde/0x1a0 kernel/time/tick-sched.c:1083
>  cpuidle_idle_call kernel/sched/idle.c:192 [inline]
>  do_idle+0xe3/0x250 kernel/sched/idle.c:306
>  cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:403
>  secondary_startup_64_no_verify+0xb1/0xbb
>
> read to 0xffffffff85ebf1e0 of 4 bytes by interrupt on cpu 1:
>  tick_sched_do_timer kernel/time/tick-sched.c:187 [inline]
>  tick_sched_timer+0x41/0x210 kernel/time/tick-sched.c:1421
>  __run_hrtimer+0x133/0x420 kernel/time/hrtimer.c:1685
>  __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
>  hrtimer_interrupt+0x36e/0xa80 kernel/time/hrtimer.c:1811
>  local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
>  __sysvec_apic_timer_interrupt+0xa3/0x250 arch/x86/kernel/apic/apic.c:1103
>  sysvec_apic_timer_interrupt+0x88/0xb0 arch/x86/kernel/apic/apic.c:1097
>  asm_sysvec_apic_timer_interrupt+0x12/0x20
>  native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
>  arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
>  default_idle+0xb/0x10 arch/x86/kernel/process.c:733
>  default_idle_call+0x28/0xd0 kernel/sched/idle.c:112
>  cpuidle_idle_call kernel/sched/idle.c:194 [inline]
>  do_idle+0xe8/0x250 kernel/sched/idle.c:306
>  cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:403
>  secondary_startup_64_no_verify+0xb1/0xbb
>
> value changed: 0x00000006 -> 0xffffffff
>
> Reported by Kernel Concurrency Sanitizer on:
> CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.16.0-rc8+ #11
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> 1.13.0-1ubuntu1.1 04/01/2014
> ==================================================================
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/CACDmwr_b0Z6JK2M6i6RZ4Qg3wb1uqG0NrybQ9mR2iw5QJT8XoA%40mail.gmail.com.

  reply	other threads:[~2022-01-11 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 13:41 KCSAN: data-race in tick_nohz_stop_tick / tick_sched_timer Kaia Yadira
2022-01-11 13:49 ` Dmitry Vyukov [this message]
     [not found]   ` <CACDmwr8QH-2Kk8DU5zxJ6RLdCho2MzkA9uMJtQ+smoV-qhOq9A@mail.gmail.com>
2022-01-11 17:18     ` Dmitry Vyukov
2022-01-12  1:38       ` Hao Sun
2022-01-12  7:39         ` Dmitry Vyukov

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=CACT4Y+ZxnG0sLhqn4uw6ueAUsA4cNZJh0_6eES6C45u9jW-4Pw@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hypericumperforatum4444@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sunhao.th@gmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=syzkaller@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=xyru1999@gmail.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;
as well as URLs for NNTP newsgroup(s).