diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-09-29 04:36:14 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-09-29 19:25:30 +0200 |
commit | a18ceb81ca78a7f37adc436f35e6eeb8683bb984 (patch) | |
tree | e47051e5acf65c5d2cf8c3fa494abb6742d0bb24 /src/peer.c | |
parent | poly1305: optimize unaligned access (diff) | |
download | wireguard-monolithic-historical-a18ceb81ca78a7f37adc436f35e6eeb8683bb984.tar.xz wireguard-monolithic-historical-a18ceb81ca78a7f37adc436f35e6eeb8683bb984.zip |
Rework headers and includes
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,11 +1,12 @@ /* Copyright 2015-2016 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ -#include "wireguard.h" #include "peer.h" +#include "device.h" #include "packets.h" #include "timers.h" #include "hashtables.h" #include "noise.h" + #include <linux/kref.h> #include <linux/lockdep.h> #include <linux/rcupdate.h> @@ -42,11 +43,7 @@ struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_ struct wireguard_peer *peer_get(struct wireguard_peer *peer) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) RCU_LOCKDEP_WARN(!rcu_read_lock_held(), "Calling peer_get without holding the RCU read lock."); -#else - rcu_lockdep_assert(rcu_read_lock_held(), "Calling peer_get without holding the RCU read lock."); -#endif if (!peer) return NULL; if (!kref_get_unless_zero(&peer->refcount)) |