Skip to content

Commit

Permalink
SLAB: Fix lockdep annotation breakage
Browse files Browse the repository at this point in the history
Commit ce79ddc ("SLAB: Fix lockdep annotations
for CPU hotplug") broke init_node_lock_keys() off-slab logic which causes
lockdep false positives.

Fix that up by reverting the logic back to original while keeping CPU hotplug
fixes intact.

Reported-and-tested-by: Heiko Carstens <[email protected]>
Reported-and-tested-by: Andi Kleen <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
  • Loading branch information
Pekka Enberg committed Dec 28, 2009
1 parent 6b7b284 commit 00afa75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ static void init_node_lock_keys(int q)

l3 = s->cs_cachep->nodelists[q];
if (!l3 || OFF_SLAB(s->cs_cachep))
return;
continue;
lockdep_set_class(&l3->list_lock, &on_slab_l3_key);
alc = l3->alien;
/*
Expand All @@ -665,7 +665,7 @@ static void init_node_lock_keys(int q)
* for alloc_alien_cache,
*/
if (!alc || (unsigned long)alc == BAD_ALIEN_MAGIC)
return;
continue;
for_each_node(r) {
if (alc[r])
lockdep_set_class(&alc[r]->lock,
Expand Down

0 comments on commit 00afa75

Please sign in to comment.