diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-16 02:21:58 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-16 02:24:23 +0200 |
commit | b7b193f499d4acd8a620163ec358c0830e856c9e (patch) | |
tree | 1d020d48074bb844750210cbb91d2b9a12461275 /src/receive.c | |
parent | tools: getentropy requires 10.12 (diff) | |
download | wireguard-monolithic-historical-b7b193f499d4acd8a620163ec358c0830e856c9e.tar.xz wireguard-monolithic-historical-b7b193f499d4acd8a620163ec358c0830e856c9e.zip |
queueing: remove useless spinlocks on sc
Since these are the only consumers, there's no need for locking.
Diffstat (limited to 'src/receive.c')
-rw-r--r-- | src/receive.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/receive.c b/src/receive.c index 27d3d04..99d6b19 100644 --- a/src/receive.c +++ b/src/receive.c @@ -378,7 +378,6 @@ void packet_rx_worker(struct work_struct *work) bool free; local_bh_disable(); - spin_lock_bh(&queue->ring.consumer_lock); while ((skb = __ptr_ring_peek(&queue->ring)) != NULL && (state = atomic_read(&PACKET_CB(skb)->state)) != PACKET_STATE_UNCRYPTED) { __ptr_ring_discard_one(&queue->ring); peer = PACKET_PEER(skb); @@ -406,7 +405,6 @@ next: if (unlikely(free)) dev_kfree_skb(skb); } - spin_unlock_bh(&queue->ring.consumer_lock); local_bh_enable(); } |