Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/jmorris/linux-security

Pull assoc array garbage collection fix from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  KEYS: Fix termination condition in assoc array garbage collection
  • Loading branch information
Linus Torvalds committed Sep 12, 2014
2 parents 5874cfe + 95389b0 commit 96ea975
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/assoc_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,11 +1723,13 @@ int assoc_array_gc(struct assoc_array *array,
shortcut = assoc_array_ptr_to_shortcut(ptr);
slot = shortcut->parent_slot;
cursor = shortcut->back_pointer;
if (!cursor)
goto gc_complete;
} else {
slot = node->parent_slot;
cursor = ptr;
}
BUG_ON(!ptr);
BUG_ON(!cursor);
node = assoc_array_ptr_to_node(cursor);
slot++;
goto continue_node;
Expand Down

0 comments on commit 96ea975

Please sign in to comment.