Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
This commit is contained in:
Linus Torvalds 2014-09-12 09:24:46 -07:00
commit 96ea975bfe
1 changed files with 3 additions and 1 deletions

View File

@ -1723,11 +1723,13 @@ ascend_old_tree:
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;