]> git.pld-linux.org Git - packages/iwd.git/commitdiff
crash fix for hw with handshake offload; rel 2 auto/th/iwd-1.22-2
authorJan Palus <atler@pld-linux.org>
Wed, 26 Jan 2022 18:08:14 +0000 (19:08 +0100)
committerJan Palus <atler@pld-linux.org>
Wed, 26 Jan 2022 18:08:14 +0000 (19:08 +0100)
handshake_offload_crash.patch [new file with mode: 0644]
iwd.spec

diff --git a/handshake_offload_crash.patch b/handshake_offload_crash.patch
new file mode 100644 (file)
index 0000000..d351728
--- /dev/null
@@ -0,0 +1,66 @@
+From: James Prestwood <prestwoj@gmail.com>
+To: iwd@lists.01.org
+Cc: James Prestwood <prestwoj@gmail.com>
+Subject: [PATCH] handshake: use _hs directly in handshake_event
+Date: Wed, 26 Jan 2022 09:41:00 -0800
+Message-Id: <20220126174100.3162606-1-prestwoj@gmail.com>
+X-Mailer: git-send-email 2.31.1
+MIME-Version: 1.0
+Message-ID-Hash: NMNRINAVG2TIZ5OC2HCAUVNIA43MR46D
+X-Message-ID-Hash: NMNRINAVG2TIZ5OC2HCAUVNIA43MR46D
+X-MailFrom: prestwoj@gmail.com
+X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header
+X-Mailman-Version: 3.1.1
+Precedence: list
+List-Id: <iwd.lists.01.org>
+Archived-At: <https://lists.01.org/hyperkitty/list/iwd@lists.01.org/message/NMNRINAVG2TIZ5OC2HCAUVNIA43MR46D/>
+List-Archive: <https://lists.01.org/hyperkitty/list/iwd@lists.01.org/>
+List-Help: <mailto:iwd-request@lists.01.org?subject=help>
+List-Post: <mailto:iwd@lists.01.org>
+List-Subscribe: <mailto:iwd-join@lists.01.org>
+List-Unsubscribe: <mailto:iwd-leave@lists.01.org>
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+X-TUID: mq6DYmslPL7v
+Content-Length: 1343
+
+Certain platforms/compilers were having issues with using the 'hs'
+local in this macro (likely has something to do with the caller
+also using a local 'hs' variable name). This caused a crash on these
+platforms. Using the macro argument _hs directly fixes the crash.
+---
+ src/handshake.h | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/src/handshake.h b/src/handshake.h
+index 34d4829d..7136087a 100644
+--- a/src/handshake.h
++++ b/src/handshake.h
+@@ -166,19 +166,18 @@ struct handshake_state {
+ #define handshake_event(_hs, event, ...)      \
+       (__extension__ ({       \
+-              struct handshake_state *hs = (_hs);     \
+               bool freed = false;     \
+       \
+-              if (hs->event_func && !hs->in_event) {  \
+-                      hs->in_event = true;    \
+-                      hs->event_func(hs, event, hs->user_data,        \
++              if ((_hs)->event_func && !(_hs)->in_event) {    \
++                      (_hs)->in_event = true; \
++                      (_hs)->event_func((_hs), event, (_hs)->user_data,       \
+                                       ##__VA_ARGS__); \
+       \
+-                      if (!hs->in_event) {    \
+-                              handshake_state_free(hs);       \
++                      if (!(_hs)->in_event) { \
++                              handshake_state_free((_hs));    \
+                               freed = true;   \
+                       } else  \
+-                              hs->in_event = false;   \
++                              (_hs)->in_event = false;        \
+               }       \
+               freed;  \
+       }))
+-- 
+2.31.1
index 1cd0fbb37a63bce39b1cfefb93cf458860445ae9..6bea37a4d27c1157e7671b8e3f3d614fc2625209 100644 (file)
--- a/iwd.spec
+++ b/iwd.spec
@@ -2,11 +2,12 @@ Summary:      iwd - wireless daemon for Linux
 Summary(pl.UTF-8):     iwd - demon sieci bezprzewodowej dla Linuksa
 Name:          iwd
 Version:       1.22
-Release:       1
+Release:       2
 License:       LGPL v2.1+
 Group:         Networking/Daemons
 Source0:       https://www.kernel.org/pub/linux/network/wireless/%{name}-%{version}.tar.xz
 # Source0-md5: 612dd43cf9bbaa0c11ccfa2ccdd6d3d7
+Patch0:                handshake_offload_crash.patch
 URL:           https://git.kernel.org/pub/scm/network/wireless/iwd.git
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
@@ -32,6 +33,7 @@ Demon sieci bezprzewodowej dla Linuksa.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
This page took 0.185404 seconds and 4 git commands to generate.