backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH backports] headers: fix lockdep_assert_not_held()
@ 2022-03-11 19:48 Petr Štetiar
  2022-04-11 22:00 ` Hauke Mehrtens
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Štetiar @ 2022-03-11 19:48 UTC (permalink / raw)
  To: hauke, mcgrof; +Cc: backports, Oskari Rauta, Petr Štetiar

LOCK_STATE_HELD define was omitted during backport of
lockdep_assert_not_held() which leads to build failures of kernels with
CONFIG_LOCKDEP=y:

 backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)

Fix it by adding missing LOCK_STATE_HELD define.

References: https://github.com/openwrt/openwrt/pull/9373
Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 backport/backport-include/linux/lockdep.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backport/backport-include/linux/lockdep.h b/backport/backport-include/linux/lockdep.h
index ed5ea67894e4..842e24b7ff8f 100644
--- a/backport/backport-include/linux/lockdep.h
+++ b/backport/backport-include/linux/lockdep.h
@@ -11,6 +11,9 @@ struct lockdep_map { };
 
 #ifndef lockdep_assert_not_held
 #ifdef CONFIG_LOCKDEP
+#ifndef LOCK_STATE_HELD
+#define LOCK_STATE_HELD		1
+#endif /* LOCK_STATE_HELD */
 #define lockdep_assert_not_held(l)	do {				\
 		WARN_ON(debug_locks &&					\
 			lockdep_is_held(l) == LOCK_STATE_HELD);		\
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH backports] headers: fix lockdep_assert_not_held()
  2022-03-11 19:48 [PATCH backports] headers: fix lockdep_assert_not_held() Petr Štetiar
@ 2022-04-11 22:00 ` Hauke Mehrtens
  0 siblings, 0 replies; 2+ messages in thread
From: Hauke Mehrtens @ 2022-04-11 22:00 UTC (permalink / raw)
  To: Petr Štetiar, mcgrof; +Cc: backports, Oskari Rauta

On 3/11/22 20:48, Petr Štetiar wrote:
> LOCK_STATE_HELD define was omitted during backport of
> lockdep_assert_not_held() which leads to build failures of kernels with
> CONFIG_LOCKDEP=y:
> 
>   backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)
> 
> Fix it by adding missing LOCK_STATE_HELD define.
> 
> References: https://github.com/openwrt/openwrt/pull/9373
> Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
> Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>

Thank you for your patch, I applied it to master.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-11 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 19:48 [PATCH backports] headers: fix lockdep_assert_not_held() Petr Štetiar
2022-04-11 22:00 ` Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).