From: Steven Rostedt <rostedt@goodmis.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH RT] locking/rtmutex: do lockdep before actual locking in rt_spin_lock()
Date: Wed, 11 Oct 2017 12:48:51 -0400 [thread overview]
Message-ID: <20171011124851.261415f0@gandalf.local.home> (raw)
In-Reply-To: <20171011161646.baxqesjqm4sip6em@linutronix.de>
On Wed, 11 Oct 2017 18:16:46 +0200
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> rt_spin_lock() should first do the lock annotation via lockdep and then
> do the actual locking. That way we learn about the deadlock from lockdep
> before it happens.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> kernel/locking/rtmutex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
> index 79f49d73e4d0..639cfdaae72f 100644
> --- a/kernel/locking/rtmutex.c
> +++ b/kernel/locking/rtmutex.c
> @@ -1153,8 +1153,8 @@ void __sched rt_spin_lock_slowunlock(struct rt_mutex *lock)
> void __lockfunc rt_spin_lock(spinlock_t *lock)
> {
> migrate_disable();
> - rt_spin_lock_fastlock(&lock->lock, rt_spin_lock_slowlock);
> spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
> + rt_spin_lock_fastlock(&lock->lock, rt_spin_lock_slowlock);
> }
> EXPORT_SYMBOL(rt_spin_lock);
>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
prev parent reply other threads:[~2017-10-11 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 16:16 [PATCH RT] locking/rtmutex: do lockdep before actual locking in rt_spin_lock() Sebastian Andrzej Siewior
2017-10-11 16:20 ` Peter Zijlstra
2017-10-11 16:48 ` Steven Rostedt [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=20171011124851.261415f0@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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).