Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344711
| Path | csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Steven Rostedt <rostedt@goodmis.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH RT 04/12] rtmutex: Handle non enqueued waiters gracefully |
| Date | Fri, 26 Feb 2016 22:40:04 +0100 |
| Message-ID | <r6yhe-RJ-49@gated-at.bofh.it> (permalink) |
| References | <r6yhc-RJ-15@gated-at.bofh.it> |
| X-Original-To | linux-kernel@vger.kernel.org, linux-rt-users <linux-rt-users@vger.kernel.org> |
| User-Agent | quilt/0.61-1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-15 |
| Content-Disposition | inline; filename=0004-rtmutex-Handle-non-enqueued-waiters-gracefully.patch |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Thomas Gleixner <tglx@linutronix.de>, Carsten Emde <C.Emde@osadl.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, John Kacur <jkacur@redhat.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, <stable-rt@vger.kernel.org> |
| X-Original-Date | Fri, 26 Feb 2016 16:32:39 -0500 |
| X-Original-Message-ID | <20160226213340.609345335@goodmis.org> |
| X-Original-References | <20160226213235.253312067@goodmis.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1344711 |
Show key headers only | View raw
3.18.27-rt26-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner <tglx@linutronix.de> Yimin debugged that in case of a PI wakeup in progress when rt_mutex_start_proxy_lock() calls task_blocks_on_rt_mutex() the latter returns -EAGAIN and in consequence the remove_waiter() call runs into a BUG_ON() because there is nothing to remove. Guard it with rt_mutex_has_waiters(). This is a quick fix which is easy to backport. The proper fix is to have a central check in remove_waiter() so we can call it unconditionally. Reported-and-debugged-by: Yimin Deng <yimin11.deng@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- 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 64973df0c686..c1b7d5b1be7e 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -2144,7 +2144,7 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock, ret = 0; } - if (unlikely(ret)) + if (ret && rt_mutex_has_waiters(lock)) remove_waiter(lock, waiter); raw_spin_unlock(&lock->wait_lock); -- 2.7.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH RT 04/12] rtmutex: Handle non enqueued waiters gracefully Steven Rostedt <rostedt@goodmis.org> - 2016-02-26 22:40 +0100
csiph-web