From: Tony Lindgren <tony@atomide.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, juri.lelli@arm.com,
bigeasy@linutronix.de, xlpang@redhat.com, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, jdesfossez@efficios.com,
dvhart@infradead.org, bristot@redhat.com
Subject: Re: [PATCH] futex: Fix hrtimer oops in futex_lock_pi()
Date: Fri, 14 Apr 2017 07:28:08 -0700 [thread overview]
Message-ID: <20170414142807.GU5339@atomide.com> (raw)
In-Reply-To: <20170414142300.z2risazpvpmjkmfp@hirez.programming.kicks-ass.net>
* Peter Zijlstra <peterz@infradead.org> [170414 07:25]:
> On Fri, Apr 14, 2017 at 07:08:19AM -0700, Tony Lindgren wrote:
> > Commit cfafcd117da0 ("futex: Rework futex_lock_pi() to use
> > rt_mutex_*_proxy_lock()") caused a regression where things would
> > occasionally randomly oops when restarting X:
> >
> > Unable to handle kernel NULL pointer dereference at virtual address 00000000
> > ...
> > Internal error: Oops: 80000005 [#1] SMP ARM
> > ...
> > PC is at 0x0
> > LR is at __hrtimer_run_queues+0x138/0x58c
> > pc : [<00000000>] lr : [<c01c7884>] psr: 20000193
> > ...
> > [<c01c7884>] (__hrtimer_run_queues) from [<c01c7f4c>]
> > (hrtimer_interrupt+0xbc/0x210)
> > [<c01c7f4c>] (hrtimer_interrupt) from [<c010fcfc>]
> > ...
> >
> > When this happens, the hrtimer is not properly initialized and it's
> > function is NULL. This happens because we now call hrtimer_start_expires()
> > in futex_lock_pi() for the timer initialized with hrtimer_init_on_stack().
> >
> > To fix it, let's pair the hrtimer_start_expires() with hrtimer_cancel()
> > in the same function.
>
> Already fixed:
>
> https://lkml.kernel.org/r/tip-97181f9bd57405b879403763284537e27d46963d@git.kernel.org
>
> Thanks for the patch though.
Oh OK thanks. It seems to be missing in Linux next though.
Regards,
Tony
next prev parent reply other threads:[~2017-04-14 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 14:08 [PATCH] futex: Fix hrtimer oops in futex_lock_pi() Tony Lindgren
2017-04-14 14:23 ` Peter Zijlstra
2017-04-14 14:28 ` Tony Lindgren [this message]
2017-04-14 14:41 ` Tony Lindgren
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=20170414142807.GU5339@atomide.com \
--to=tony@atomide.com \
--cc=bigeasy@linutronix.de \
--cc=bristot@redhat.com \
--cc=dvhart@infradead.org \
--cc=jdesfossez@efficios.com \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=xlpang@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.