Re: [PATCH 13/14] lockdep: Implement lock pinning

2015-06-11 Thread Peter Zijlstra
On Fri, Jun 05, 2015 at 11:55:52AM +0200, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > RFC: a possible alternative API would be something like: > > > > int cookie = lockdep_pin_lock(&foo); > > ... > > lockdep_unpin_lock(&foo, cookie); > > Yeah, this would be even nicer. > > > Wh

Re: [PATCH 13/14] lockdep: Implement lock pinning

2015-06-05 Thread Ingo Molnar
* Peter Zijlstra wrote: > RFC: a possible alternative API would be something like: > > int cookie = lockdep_pin_lock(&foo); > ... > lockdep_unpin_lock(&foo, cookie); Yeah, this would be even nicer. > Where we pick a random number for the pin_count; this makes it > impossible to sneak a