imagebuilder: export SOURCE_DATE_EPOCH to environment
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / build / 070-headers-fix-lockdep_assert_not_held.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
3 Date: Fri, 11 Mar 2022 18:21:04 +0100
4 Subject: [PATCH] headers: fix lockdep_assert_not_held()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 LOCK_STATE_HELD define was omitted during backport of
10 lockdep_assert_not_held() which leads to build failures of kernels with
11 CONFIG_LOCKDEP=y:
12
13 backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)
14
15 Fix it by adding missing LOCK_STATE_HELD define.
16
17 References: https://github.com/openwrt/openwrt/pull/9373
18 References: https://lore.kernel.org/backports/20220311194800.452-1-ynezz@true.cz/T/#u
19 Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
20 Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
21 Signed-off-by: Petr Štetiar <ynezz@true.cz>
22 ---
23 backport-include/linux/lockdep.h | 3 +++
24 1 file changed, 3 insertions(+)
25
26 diff --git a/backport-include/linux/lockdep.h b/backport-include/linux/lockdep.h
27 index ed5ea67894e4..842e24b7ff8f 100644
28 --- a/backport-include/linux/lockdep.h
29 +++ b/backport-include/linux/lockdep.h
30 @@ -11,6 +11,9 @@ struct lockdep_map { };
31
32 #ifndef lockdep_assert_not_held
33 #ifdef CONFIG_LOCKDEP
34 +#ifndef LOCK_STATE_HELD
35 +#define LOCK_STATE_HELD 1
36 +#endif /* LOCK_STATE_HELD */
37 #define lockdep_assert_not_held(l) do { \
38 WARN_ON(debug_locks && \
39 lockdep_is_held(l) == LOCK_STATE_HELD); \