From b713ab0e605b4f9291f4fde38103bf689c2cdb76 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 31 Jul 2018 07:03:07 +0200 Subject: peer: simplify rcu reference counts Use RCU reference counts only when we must, and otherwise use a more reasonably named function. Reported-by: Jann Horn --- src/receive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/receive.c') diff --git a/src/receive.c b/src/receive.c index 732ac2b..5e231c9 100644 --- a/src/receive.c +++ b/src/receive.c @@ -448,7 +448,7 @@ static void packet_consume_data(struct wireguard_device *wg, struct sk_buff *skb return; } - /* The call to index_hashtable_lookup gives us a reference to its underlying peer, so we don't need to call peer_rcu_get(). */ + /* The call to index_hashtable_lookup gives us a reference to its underlying peer, so we don't need to call peer_get(). */ peer = PACKET_PEER(skb); ret = queue_enqueue_per_device_and_peer(&wg->decrypt_queue, &peer->rx_queue, skb, wg->packet_crypt_wq, &wg->decrypt_queue.last_cpu); -- cgit v1.2.3-59-g8ed1b