diff options
author | Linus Torvalds | 2014-09-12 18:24:46 +0200 |
---|---|---|
committer | Linus Torvalds | 2014-09-12 18:24:46 +0200 |
commit | 96ea975bfeec855d119bb93df885d7f18452856a (patch) | |
tree | c6d9f59ff6a08f8abd52f00cdb1a6cfdbd043814 | |
parent | Merge tag 'fbdev-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | KEYS: Fix termination condition in assoc array garbage collection (diff) | |
download | kernel-qcow2-linux-96ea975bfeec855d119bb93df885d7f18452856a.tar.gz kernel-qcow2-linux-96ea975bfeec855d119bb93df885d7f18452856a.tar.xz kernel-qcow2-linux-96ea975bfeec855d119bb93df885d7f18452856a.zip |
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: 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; |