1 |
commit: c06fba038a7fd27ef6bc684af127936bbd419b64 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 2 17:27:35 2017 +0000 |
4 |
Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 2 17:27:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c06fba03 |
7 |
|
8 |
net-vpn/wireguard: fix compilation on LOCKDEP machines |
9 |
|
10 |
Package-Manager: Portage-2.3.11, Repoman-2.3.3 |
11 |
|
12 |
.../files/wireguard-0.0.20171101-funcfix.patch | 40 ++++++++++++++++++++++ |
13 |
net-vpn/wireguard/wireguard-0.0.20171101.ebuild | 2 ++ |
14 |
2 files changed, 42 insertions(+) |
15 |
|
16 |
diff --git a/net-vpn/wireguard/files/wireguard-0.0.20171101-funcfix.patch b/net-vpn/wireguard/files/wireguard-0.0.20171101-funcfix.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..fe74e48b5dd |
19 |
--- /dev/null |
20 |
+++ b/net-vpn/wireguard/files/wireguard-0.0.20171101-funcfix.patch |
21 |
@@ -0,0 +1,40 @@ |
22 |
+From cc310a5dd1899417971e993d61d1230b14fe4f87 Mon Sep 17 00:00:00 2001 |
23 |
+From: "Jason A. Donenfeld" <Jason@×××××.com> |
24 |
+Date: Thu, 2 Nov 2017 16:07:26 +0100 |
25 |
+Subject: global: revert checkpatch.pl changes |
26 |
+ |
27 |
+These changes were suggested by checkpatch.pl, but actually cause big |
28 |
+problems depending on the options. Revert. |
29 |
+--- |
30 |
+ src/noise.c | 2 +- |
31 |
+ src/peer.c | 2 +- |
32 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
33 |
+ |
34 |
+diff --git a/src/noise.c b/src/noise.c |
35 |
+index a0bea29..6ce9b78 100644 |
36 |
+--- a/src/noise.c |
37 |
++++ b/src/noise.c |
38 |
+@@ -118,7 +118,7 @@ void noise_keypair_put(struct noise_keypair *keypair) |
39 |
+ |
40 |
+ struct noise_keypair *noise_keypair_get(struct noise_keypair *keypair) |
41 |
+ { |
42 |
+- RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), "Calling " __func__ " without holding the RCU BH read lock"); |
43 |
++ RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), "Taking noise keypair reference without holding the RCU BH read lock"); |
44 |
+ if (unlikely(!keypair || !kref_get_unless_zero(&keypair->refcount))) |
45 |
+ return NULL; |
46 |
+ return keypair; |
47 |
+diff --git a/src/peer.c b/src/peer.c |
48 |
+index 1580262..81b71d4 100644 |
49 |
+--- a/src/peer.c |
50 |
++++ b/src/peer.c |
51 |
+@@ -58,7 +58,7 @@ struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_ |
52 |
+ |
53 |
+ struct wireguard_peer *peer_get(struct wireguard_peer *peer) |
54 |
+ { |
55 |
+- RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), "Calling " __func__ " without holding the RCU read lock"); |
56 |
++ RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), "Taking peer reference without holding the RCU read lock"); |
57 |
+ if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) |
58 |
+ return NULL; |
59 |
+ return peer; |
60 |
+-- |
61 |
+cgit v1.1-33-gc3c0 |
62 |
|
63 |
diff --git a/net-vpn/wireguard/wireguard-0.0.20171101.ebuild b/net-vpn/wireguard/wireguard-0.0.20171101.ebuild |
64 |
index fdc71975143..579c9736f07 100644 |
65 |
--- a/net-vpn/wireguard/wireguard-0.0.20171101.ebuild |
66 |
+++ b/net-vpn/wireguard/wireguard-0.0.20171101.ebuild |
67 |
@@ -30,6 +30,8 @@ MODULE_NAMES="wireguard(kernel/drivers/net:src)" |
68 |
BUILD_TARGETS="module" |
69 |
CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_BLKCIPHER" |
70 |
|
71 |
+PATCHES=( "${FILESDIR}/${P}-funcfix.patch" ) |
72 |
+ |
73 |
pkg_setup() { |
74 |
if use module; then |
75 |
linux-mod_pkg_setup |