lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2
On Tue, Oct 10, 2017 at 08:14:09PM +0200, Peter Zijlstra wrote:
> On Tue, Oct 10, 2017 at 09:56:26AM -0700, Linus Torvalds wrote:
>
> > So I think the best model would be something like this:
> >
> > - T1:
> > mutex_lock(&lock)
> > ...
> > mutex_transfer(&lock)
> >
> > - T2:
> > mutex_receive(&lock);
> > ...
> > mutex_unlock(&lock);
> >
> > where the "mutex_transfer() -> mutex_receive()" thing really makes it
> > obvious that "now thread 1 is transferring the lock to thread 2".
>
> Ah, but that's not at all what cross-release is about. Nobody really
> does wonky ownership transfer of mutexes like that (although there might
> be someone doing something with semaphores, I didn't check). Its to
> allow detecting this deadlock:
>
> mutex_lock(&lock)
> wait_for_completion(&c);
> mutex_lock(&lock);
> complete(&c);
>
> The completion doesn't have an owner to transfer.

Plus, lock_page(). Honestly, I want that to be the main beneficiary when
we talking about crossrelease.

Actually, I started the crossrelease work to detect deadlocks by
lock_page() and expect it's more useful.

\
 
 \ /
  Last update: 2017-10-11 03:16    [W:1.341 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site