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

Commit c3a997f0 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Lee Jones
Browse files

UPSTREAM: wireguard: allowedips: add missing __rcu annotation to satisfy sparse



A __rcu annotation got lost during refactoring, which caused sparse to
become enraged.

Bug: 254441685
Fixes: bf7b042dc62a ("wireguard: allowedips: free empty intermediate nodes when removing single node")
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit ae9287811ba75571cd69505d50ab0e612ace8572)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Icf700db89dbba3ba4026b94722b291121b5ef01f
parent d3029b58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ static bool node_placement(struct allowedips_node __rcu *trie, const u8 *key,
	return exact;
}

static inline void connect_node(struct allowedips_node **parent, u8 bit, struct allowedips_node *node)
static inline void connect_node(struct allowedips_node __rcu **parent, u8 bit, struct allowedips_node *node)
{
	node->parent_bit_packed = (unsigned long)parent | bit;
	rcu_assign_pointer(*parent, node);