From: Thomas Gleixner <tglx@linutronix.de>
To: Frederic Weisbecker <frederic@kernel.org>,
Marco Elver <elver@google.com>
Cc: syzbot <syzbot+3b14b2ed9b3d06dcaa07@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Jacob Keller <jacob.e.keller@intel.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: WARNING in timer_wait_running
Date: Thu, 06 Apr 2023 21:37:40 +0200 [thread overview]
Message-ID: <87h6tsred7.ffs@tglx> (raw)
In-Reply-To: <ZC3z2UhQeXENKvrb@lothringen>
On Thu, Apr 06 2023 at 00:19, Frederic Weisbecker wrote:
> On Wed, Apr 05, 2023 at 11:07:24PM +0200, Marco Elver wrote:
>> Up-to-date warning:
>>
>> | WARNING: CPU: 1 PID: 6695 at kernel/time/posix-timers.c:849 timer_wait_running+0x255/0x290 kernel/time/posix-timers.c:849
>>
>> Why is it wrong for timer_wait_running to be NULL?
>
> It appears to concern clock_posix_cpu which indeed doesn't implement
> ->timer_wait_running even though posix_cpu_timer_set() might return
> TIMER_RETRY if the timer is about to fire.
>
> Then on RT and if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y then
> timer_wait_running() must busy loop waiting for the task to complete
> the task work.
>
> We could arrange for doing the same thing as hrtimer_cancel_wait_running()
> but for posix cpu timers, with taking a similar lock within
> handle_posix_cpu_timers() that timer_wait_running() could sleep on and
> inject its PI into.
I have a faint memory that we discussed something like that, but there
was an issue which completely escaped my memory.
But yes, something like this could work.
Though we should quickly shut this warning up for the !RT case by
providing an callback which does
WARN_ON_ONCE(IS_ENABLED(CONFIG_PREEMPT_RT);
and let the RT folks deal with it.
Thanks,
tglx
next prev parent reply other threads:[~2023-04-06 19:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 17:07 WARNING in timer_wait_running syzbot
2023-04-05 21:07 ` Marco Elver
2023-04-05 22:19 ` Frederic Weisbecker
2023-04-06 19:37 ` Thomas Gleixner [this message]
2023-04-07 8:44 ` Thomas Gleixner
2023-04-07 11:50 ` Frederic Weisbecker
2023-04-07 17:47 ` Thomas Gleixner
2023-04-07 18:36 ` Frederic Weisbecker
2023-04-07 19:27 ` Thomas Gleixner
2023-04-07 21:00 ` Frederic Weisbecker
2023-04-11 14:31 ` Marco Elver
2023-04-17 13:37 ` [PATCH] posix-cpu-timers: Implement the missing timer_wait_running callback Thomas Gleixner
2023-04-17 15:34 ` Sebastian Andrzej Siewior
2023-04-18 6:00 ` Marco Elver
2023-04-18 16:44 ` Frederic Weisbecker
2023-04-19 7:33 ` Thomas Gleixner
2023-04-19 8:33 ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
2023-04-20 7:51 ` tip-bot2 for Thomas Gleixner
2023-04-21 13:43 ` tip-bot2 for Thomas Gleixner
[not found] ` <20230407134620.1034-1-hdanton@sina.com>
2023-04-07 14:49 ` WARNING in timer_wait_running Frederic Weisbecker
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=87h6tsred7.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=syzbot+3b14b2ed9b3d06dcaa07@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;
as well as URLs for NNTP newsgroup(s).