keyring: Remove now-redundant smp_read_barrier_depends()
Now that the associative-array library properly heads dependency chains, the various smp_read_barrier_depends() calls in security/keys/keyring.c are no longer needed. This commit therefore removes them. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: David Howells <dhowells@redhat.com> Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: <keyrings@vger.kernel.org> Cc: <linux-security-module@vger.kernel.org> Reviewed-by: James Morris <james.l.morris@oracle.com>pull/514/head
parent
4be2b04e43
commit
d963007c72
|
|
@ -713,7 +713,6 @@ descend_to_keyring:
|
||||||
* doesn't contain any keyring pointers.
|
* doesn't contain any keyring pointers.
|
||||||
*/
|
*/
|
||||||
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
||||||
smp_read_barrier_depends();
|
|
||||||
if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0)
|
if ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0)
|
||||||
goto not_this_keyring;
|
goto not_this_keyring;
|
||||||
|
|
||||||
|
|
@ -723,8 +722,6 @@ descend_to_keyring:
|
||||||
}
|
}
|
||||||
|
|
||||||
node = assoc_array_ptr_to_node(ptr);
|
node = assoc_array_ptr_to_node(ptr);
|
||||||
smp_read_barrier_depends();
|
|
||||||
|
|
||||||
ptr = node->slots[0];
|
ptr = node->slots[0];
|
||||||
if (!assoc_array_ptr_is_meta(ptr))
|
if (!assoc_array_ptr_is_meta(ptr))
|
||||||
goto begin_node;
|
goto begin_node;
|
||||||
|
|
@ -736,7 +733,6 @@ descend_to_node:
|
||||||
kdebug("descend");
|
kdebug("descend");
|
||||||
if (assoc_array_ptr_is_shortcut(ptr)) {
|
if (assoc_array_ptr_is_shortcut(ptr)) {
|
||||||
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
||||||
smp_read_barrier_depends();
|
|
||||||
ptr = READ_ONCE(shortcut->next_node);
|
ptr = READ_ONCE(shortcut->next_node);
|
||||||
BUG_ON(!assoc_array_ptr_is_node(ptr));
|
BUG_ON(!assoc_array_ptr_is_node(ptr));
|
||||||
}
|
}
|
||||||
|
|
@ -744,7 +740,6 @@ descend_to_node:
|
||||||
|
|
||||||
begin_node:
|
begin_node:
|
||||||
kdebug("begin_node");
|
kdebug("begin_node");
|
||||||
smp_read_barrier_depends();
|
|
||||||
slot = 0;
|
slot = 0;
|
||||||
ascend_to_node:
|
ascend_to_node:
|
||||||
/* Go through the slots in a node */
|
/* Go through the slots in a node */
|
||||||
|
|
@ -792,14 +787,12 @@ ascend_to_node:
|
||||||
|
|
||||||
if (ptr && assoc_array_ptr_is_shortcut(ptr)) {
|
if (ptr && assoc_array_ptr_is_shortcut(ptr)) {
|
||||||
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
shortcut = assoc_array_ptr_to_shortcut(ptr);
|
||||||
smp_read_barrier_depends();
|
|
||||||
ptr = READ_ONCE(shortcut->back_pointer);
|
ptr = READ_ONCE(shortcut->back_pointer);
|
||||||
slot = shortcut->parent_slot;
|
slot = shortcut->parent_slot;
|
||||||
}
|
}
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
goto not_this_keyring;
|
goto not_this_keyring;
|
||||||
node = assoc_array_ptr_to_node(ptr);
|
node = assoc_array_ptr_to_node(ptr);
|
||||||
smp_read_barrier_depends();
|
|
||||||
slot++;
|
slot++;
|
||||||
|
|
||||||
/* If we've ascended to the root (zero backpointer), we must have just
|
/* If we've ascended to the root (zero backpointer), we must have just
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue