Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96ea975b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 5874cfed 95389b08
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;