backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Petr Štetiar" <ynezz@true.cz>
To: hauke@hauke-m.de, mcgrof@kernel.org
Cc: backports@vger.kernel.org,
	"Oskari Rauta" <oskari.rauta@gmail.com>,
	"Petr Štetiar" <ynezz@true.cz>
Subject: [PATCH backports] headers: fix lockdep_assert_not_held()
Date: Fri, 11 Mar 2022 20:48:00 +0100	[thread overview]
Message-ID: <20220311194800.452-1-ynezz@true.cz> (raw)

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

             reply	other threads:[~2022-03-11 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 19:48 Petr Štetiar [this message]
2022-04-11 22:00 ` [PATCH backports] headers: fix lockdep_assert_not_held() Hauke Mehrtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220311194800.452-1-ynezz@true.cz \
    --to=ynezz@true.cz \
    --cc=backports@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=mcgrof@kernel.org \
    --cc=oskari.rauta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).