[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1704101802370.2906@nanos>
Date: Mon, 10 Apr 2017 18:03:36 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: alexander.levin@...izon.com
cc: Peter Zijlstra <peterz@...radead.org>,
"mingo@...nel.org" <mingo@...nel.org>,
"juri.lelli@....com" <juri.lelli@....com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"xlpang@...hat.com" <xlpang@...hat.com>,
"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
"jdesfossez@...icios.com" <jdesfossez@...icios.com>,
"bristot@...hat.com" <bristot@...hat.com>,
"dvhart@...radead.org" <dvhart@...radead.org>
Subject: Re: [PATCH -v6 11/13] futex: Rework futex_lock_pi() to use
rt_mutex_*_proxy_lock()
On Mon, 10 Apr 2017, alexander.levin@...izon.com wrote:
> On Wed, Mar 22, 2017 at 11:35:58AM +0100, Peter Zijlstra wrote:
> > By changing futex_lock_pi() to use rt_mutex_*_proxy_lock() we arrive
> > at a point where all wait_list modifications are done under both
> > hb->lock and wait_lock.
> [...]
>
> Hey Peter,
>
> I'm seeing the following, which seems to be related to this patch:
>
> [ 21.762875] ODEBUG: free active (active state 0) object type: hrtimer hint: hrtimer_wakeup (kernel/time/hrtimer.c:1423)
> [ 21.788050] debug_object_free (lib/debugobjects.c:603)
> [ 21.791105] destroy_hrtimer_on_stack (kernel/time/hrtimer.c:427)
> [ 21.791746] futex_lock_pi (kernel/futex.c:2740)
> [ 21.800721] do_futex (kernel/futex.c:3399)
> [ 21.818395] SyS_futex (kernel/futex.c:3447 kernel/futex.c:3415)
> [ 21.822260] do_syscall_64 (arch/x86/entry/common.c:284)
> [ 21.827328] entry_SYSCALL64_slow_path (arch/x86/entry/entry_64.S:249)
Yep, that rework dropped the hrtimer cancel. Fix below.
Thanks,
tglx
8<------------------------
diff --git a/kernel/futex.c b/kernel/futex.c
index c3eebcdac206..7ac167683c9f 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2736,8 +2736,10 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
out_put_key:
put_futex_key(&q.key);
out:
- if (to)
+ if (to) {
+ hrtimer_cancel(&to->timer);
destroy_hrtimer_on_stack(&to->timer);
+ }
return ret != -EINTR ? ret : -ERESTARTNOINTR;
uaddr_faulted:
Powered by blists - more mailing lists