lkml.org 
[lkml]   [2014]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] rtmutex: Handle when top lock owner changes
On Fri, 6 Jun 2014 07:40:10 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:

> On Thu, 5 Jun 2014, Steven Rostedt wrote:
> > On Wed, 4 Jun 2014 17:32:37 +0200 (CEST)
> > Thomas Gleixner <tglx@linutronix.de> 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.
>

Ah, the lock can be freed (out of memory that is). Why didn't you say
so in the first place ;-)

-- Steve


\
 
 \ /
  Last update: 2014-06-06 11:41    [W:0.064 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site