[lkml]   [2019]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v6 00/16] locking/lockdep: Add support for dynamic keys
On Fri, 2019-01-11 at 13:48 +0100, Peter Zijlstra wrote:
> I spotted this new v6 in my inbox and have rebased to it.


> On Wed, Jan 09, 2019 at 01:01:48PM -0800, Bart Van Assche wrote:
> > The changes compared to v5 are:
> > - Modified zap_class() such that it doesn't try to free a list entry that
> > is already being freed.
> I however have a question on this; this seems wrong. Once a list entry
> is enqueued it should not be reachable anymore. If we can reach an entry
> after call_rcu() happened, we've got a problem.

Apparently I confused you - sorry that I was not more clear. What I meant is
that I changed a single if test into a loop. The graph lock is held while that
loop is being executed so the code below is serialized against the code called
from inside the RCU callback:

@@ -4574,8 +4563,9 @@ static void zap_class(struct pending_free *pf, struct lock
_class *class)
entry = list_entries + i;
if (entry->class != class && entry->links_to != class)
- if (__test_and_set_bit(i, pf->list_entries_being_freed))
+ if (list_entry_being_freed(i))
+ set_bit(i, pf->list_entries_being_freed);

Please let me know if you need more information.


 \ /
  Last update: 2019-01-11 16:55    [W:0.144 / U:3.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site