Thread (23 messages) 23 messages, 3 authors, 2014-06-06

Re: [PATCH 1/1] rtmutex: Handle when top lock owner changes

From: Thomas Gleixner <hidden>
Date: 2014-06-06 05:44:29
Also in: lkml

On Fri, 6 Jun 2014, Thomas Gleixner wrote:
On Thu, 5 Jun 2014, Steven Rostedt wrote:
quoted
On Wed, 4 Jun 2014 17:32:37 +0200 (CEST)
Thomas Gleixner [off-list ref] wrote:
+	/*
+	 * When we dropped the spinlocks, if the owner of the lock we
+	 * are currently processing changed since we chain walked
+	 * to that lock, we are done with the chain walk. The previous
+	 * owner was obviously running to release it.
+	 */
+	if (lock && rt_mutex_owner(lock) != task)
+		goto out_unlock_pi;
NO. You CANNOT derefernce lock after dropping the locks. It might be
gone already.
The only information we can check is, whether @task changed the
blocked on lock, really.

Thanks,

	tglx
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help