diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-31 07:03:07 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-31 07:19:52 +0200 |
commit | 488b7dcba7a5dcf5d65349992c7fc32b3d9c17d1 (patch) | |
tree | 847677cfc90dee98bfe86d64a991f3ff0d8f428d /src/receive.c | |
parent | ratelimiter: prevent init/uninit race (diff) | |
download | wireguard-linux-compat-488b7dcba7a5dcf5d65349992c7fc32b3d9c17d1.tar.xz wireguard-linux-compat-488b7dcba7a5dcf5d65349992c7fc32b3d9c17d1.zip |
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 <jann@thejh.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/receive.c')
-rw-r--r-- | src/receive.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |