The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: syzbot <syzbot+e84a763987edd173d82f@syzkaller.appspotmail.com>,
	anna-maria@linutronix.de, frederic@kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Cc: Alexander Potapenko <glider@google.com>,
	Marco Elver <elver@google.com>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [syzbot] [kernel?] KMSAN: uninit-value in hrtimer_wakeup
Date: Thu, 24 Jul 2025 17:31:35 +0200	[thread overview]
Message-ID: <87cy9pr4fc.ffs@tglx> (raw)
In-Reply-To: <68820e8e.a00a0220.2f88df.0022.GAE@google.com>

On Thu, Jul 24 2025 at 03:44, syzbot wrote:
> HEAD commit:    bf61759db409 Merge tag 'sched_ext-for-6.16-rc6-fixes' of g..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1693938c580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=5227c65742122bdd
> dashboard link: https://syzkaller.appspot.com/bug?extid=e84a763987edd173d82f
> compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/c9e297bb553f/disk-bf61759d.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/7f2d1bf53414/vmlinux-bf61759d.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/9a4f67426eab/bzImage-bf61759d.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+e84a763987edd173d82f@syzkaller.appspotmail.com
>
> =====================================================
> BUG: KMSAN: uninit-value in hrtimer_wakeup+0xcb/0xd0 kernel/time/hrtimer.c:1997
>  hrtimer_wakeup+0xcb/0xd0 kernel/time/hrtimer.c:1997

...

> Local variable t created at:
>  hrtimer_nanosleep+0x48/0x480 kernel/time/hrtimer.c:2142
>  common_nsleep+0x118/0x160 kernel/time/posix-timers.c:1353

This makes absolutely no sense. hrtimer_nanosleep() initializes the
local variable

      struct hrtimer_sleeper t;

in two steps:

      hrtimer_setup_sleeper_on_stack(&t, clockid, mode);
      hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns);
      
and the complaint in hrtimer_wakeup() is:

 1989 static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer)
 1990 {
 1991         struct hrtimer_sleeper *t =
 1992                 container_of(timer, struct hrtimer_sleeper, timer);
 1993         struct task_struct *task = t->task;
 1994 
 1995         t->task = NULL;
 1996         if (task)
 1997                 wake_up_process(task);    <---- here
 1998 
 1999         return HRTIMER_NORESTART;
 2000 }

t->task was initialized:

 2027 static void __hrtimer_setup_sleeper(struct hrtimer_sleeper *sl,
 2028                                     clockid_t clock_id, enum hrtimer_mode mode)
 2029 {
 ...
 2054         __hrtimer_setup(&sl->timer, hrtimer_wakeup, clock_id, mode);
 2055         sl->task = current;              <---- here
 2056 }

This code hasn't changed in a very long time. Looks like KMSAN is confused...


      reply	other threads:[~2025-07-24 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 10:44 [syzbot] [kernel?] KMSAN: uninit-value in hrtimer_wakeup syzbot
2025-07-24 15:31 ` Thomas Gleixner [this message]

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=87cy9pr4fc.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=frederic@kernel.org \
    --cc=glider@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+e84a763987edd173d82f@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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