Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, Mar 08, 2017 at 04:29:02PM +0100, Sebastian Andrzej Siewior wrote: > kernel/futex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index 00ec4a01d3f5..73abfe0da4d0 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -3046,11 +3046,11 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, > unsigned int flags, > WARN_ON(!q.pi_state); > pi_mutex = _state->pi_mutex; > ret = rt_mutex_wait_proxy_lock(pi_mutex, to, _waiter); > - debug_rt_mutex_free_waiter(_waiter); > > spin_lock(q.lock_ptr); > if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, _waiter)) > ret = 0; > + debug_rt_mutex_free_waiter(_waiter); > > /* >* Fixup the pi_state owner and possibly acquire the lock if we > Thanks, folded.
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, Mar 08, 2017 at 04:29:02PM +0100, Sebastian Andrzej Siewior wrote: > kernel/futex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index 00ec4a01d3f5..73abfe0da4d0 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -3046,11 +3046,11 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, > unsigned int flags, > WARN_ON(!q.pi_state); > pi_mutex = _state->pi_mutex; > ret = rt_mutex_wait_proxy_lock(pi_mutex, to, _waiter); > - debug_rt_mutex_free_waiter(_waiter); > > spin_lock(q.lock_ptr); > if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, _waiter)) > ret = 0; > + debug_rt_mutex_free_waiter(_waiter); > > /* >* Fixup the pi_state owner and possibly acquire the lock if we > Thanks, folded.
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, 8 Mar 2017 16:37:32 +0100 Sebastian Andrzej Siewiorwrote: > On 2017-03-08 16:29:02 [+0100], To Peter Zijlstra wrote: > > Without this, futex_requeue_pi_signal_restart will trigger > > > > |kernel BUG at locking/rtmutex_common.h:55! > > |Call Trace: > > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > > | do_futex+0x289/0xbf0 > > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > > > with BUG != pointer once this patch is applied. > > My wording is wrong. This BUG_ON() statement described here in this > patch (together with the test case mentioned) will trigger once > > "[PATCH -v5 12/14] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()" > > is applied. > Now I read this. Ignore my last email. -- Steve
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, 8 Mar 2017 16:37:32 +0100 Sebastian Andrzej Siewior wrote: > On 2017-03-08 16:29:02 [+0100], To Peter Zijlstra wrote: > > Without this, futex_requeue_pi_signal_restart will trigger > > > > |kernel BUG at locking/rtmutex_common.h:55! > > |Call Trace: > > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > > | do_futex+0x289/0xbf0 > > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > > > with BUG != pointer once this patch is applied. > > My wording is wrong. This BUG_ON() statement described here in this > patch (together with the test case mentioned) will trigger once > > "[PATCH -v5 12/14] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()" > > is applied. > Now I read this. Ignore my last email. -- Steve
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, 8 Mar 2017 16:29:02 +0100 Sebastian Andrzej Siewiorwrote: > Without this, futex_requeue_pi_signal_restart will trigger > > |kernel BUG at locking/rtmutex_common.h:55! > |Call Trace: > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > | do_futex+0x289/0xbf0 > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > with BUG != pointer once this patch is applied. This sentence makes no sense. It's a no-sensetence ;-) -- Steve > > Signed-off-by: Sebastian Andrzej Siewior > --- > kernel/futex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index 00ec4a01d3f5..73abfe0da4d0 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -3046,11 +3046,11 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, > unsigned int flags, > WARN_ON(!q.pi_state); > pi_mutex = _state->pi_mutex; > ret = rt_mutex_wait_proxy_lock(pi_mutex, to, _waiter); > - debug_rt_mutex_free_waiter(_waiter); > > spin_lock(q.lock_ptr); > if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, _waiter)) > ret = 0; > + debug_rt_mutex_free_waiter(_waiter); > > /* >* Fixup the pi_state owner and possibly acquire the lock if we
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On Wed, 8 Mar 2017 16:29:02 +0100 Sebastian Andrzej Siewior wrote: > Without this, futex_requeue_pi_signal_restart will trigger > > |kernel BUG at locking/rtmutex_common.h:55! > |Call Trace: > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > | do_futex+0x289/0xbf0 > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > with BUG != pointer once this patch is applied. This sentence makes no sense. It's a no-sensetence ;-) -- Steve > > Signed-off-by: Sebastian Andrzej Siewior > --- > kernel/futex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index 00ec4a01d3f5..73abfe0da4d0 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -3046,11 +3046,11 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, > unsigned int flags, > WARN_ON(!q.pi_state); > pi_mutex = _state->pi_mutex; > ret = rt_mutex_wait_proxy_lock(pi_mutex, to, _waiter); > - debug_rt_mutex_free_waiter(_waiter); > > spin_lock(q.lock_ptr); > if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, _waiter)) > ret = 0; > + debug_rt_mutex_free_waiter(_waiter); > > /* >* Fixup the pi_state owner and possibly acquire the lock if we
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On 2017-03-08 16:29:02 [+0100], To Peter Zijlstra wrote: > Without this, futex_requeue_pi_signal_restart will trigger > > |kernel BUG at locking/rtmutex_common.h:55! > |Call Trace: > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > | do_futex+0x289/0xbf0 > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > with BUG != pointer once this patch is applied. My wording is wrong. This BUG_ON() statement described here in this patch (together with the test case mentioned) will trigger once "[PATCH -v5 12/14] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()" is applied. Sebastian
Re: [PATCH] futex: move debug_rt_mutex_free_waiter() further down
On 2017-03-08 16:29:02 [+0100], To Peter Zijlstra wrote: > Without this, futex_requeue_pi_signal_restart will trigger > > |kernel BUG at locking/rtmutex_common.h:55! > |Call Trace: > | rt_mutex_cleanup_proxy_lock+0x54/0x90 > | futex_wait_requeue_pi.constprop.21+0x387/0x4d0 > | do_futex+0x289/0xbf0 > |RIP: remove_waiter+0x157/0x170 RSP: c9e0fbe0 > > with BUG != pointer once this patch is applied. My wording is wrong. This BUG_ON() statement described here in this patch (together with the test case mentioned) will trigger once "[PATCH -v5 12/14] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()" is applied. Sebastian