diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-12 12:24:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-12 12:24:46 -0400 |
commit | 96ea975bfeec855d119bb93df885d7f18452856a (patch) | |
tree | c6d9f59ff6a08f8abd52f00cdb1a6cfdbd043814 | |
parent | 5874cfed0b04f53146f70a519a2371cea5f39178 (diff) | |
parent | 95389b08d93d5c06ec63ab49bd732b0069b7c35e (diff) |
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
-rw-r--r-- | lib/assoc_array.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c index ae146f0734eb..2404d03e251a 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c | |||
@@ -1723,11 +1723,13 @@ ascend_old_tree: | |||
1723 | shortcut = assoc_array_ptr_to_shortcut(ptr); | 1723 | shortcut = assoc_array_ptr_to_shortcut(ptr); |
1724 | slot = shortcut->parent_slot; | 1724 | slot = shortcut->parent_slot; |
1725 | cursor = shortcut->back_pointer; | 1725 | cursor = shortcut->back_pointer; |
1726 | if (!cursor) | ||
1727 | goto gc_complete; | ||
1726 | } else { | 1728 | } else { |
1727 | slot = node->parent_slot; | 1729 | slot = node->parent_slot; |
1728 | cursor = ptr; | 1730 | cursor = ptr; |
1729 | } | 1731 | } |
1730 | BUG_ON(!ptr); | 1732 | BUG_ON(!cursor); |
1731 | node = assoc_array_ptr_to_node(cursor); | 1733 | node = assoc_array_ptr_to_node(cursor); |
1732 | slot++; | 1734 | slot++; |
1733 | goto continue_node; | 1735 | goto continue_node; |