All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: mingo@redhat.com, will@kernel.org, longman@redhat.com,
	boqun.feng@gmail.com
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	joro@8bytes.org, bp@alien8.de, tglx@linutronix.de,
	bigeasy@linutronix.de
Subject: [PATCH 2/3] lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING
Date: Thu, 17 Jun 2021 20:57:19 +0200	[thread overview]
Message-ID: <20210617190313.322096283@infradead.org> (raw)
In-Reply-To: 20210617185717.486456641@infradead.org

When PROVE_RAW_LOCK_NESTING=y many of the selftests FAILED because
HARDIRQ context is out-of-bounds for spinlocks. Instead make the
default hardware context the threaded hardirq context, which preserves
the old locking rules.

The wait-type specific locking selftests will have a non-threaded
HARDIRQ variant.

Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 lib/locking-selftest.c |    1 +
 1 file changed, 1 insertion(+)

--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -194,6 +194,7 @@ static void init_shared_classes(void)
 #define HARDIRQ_ENTER()				\
 	local_irq_disable();			\
 	__irq_enter();				\
+	lockdep_hardirq_threaded();		\
 	WARN_ON(!in_irq());
 
 #define HARDIRQ_EXIT()				\



  parent reply	other threads:[~2021-06-17 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 18:57 [PATCH 0/3] lockdep: PROVE_RAW_LOCK_NESTING=y fixes Peter Zijlstra
2021-06-17 18:57 ` [PATCH 1/3] lockdep: Fix wait-type for empty stack Peter Zijlstra
2021-06-23  8:19   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2021-06-17 18:57 ` Peter Zijlstra [this message]
2021-06-23  8:19   ` [tip: locking/core] lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING tip-bot2 for Peter Zijlstra
2021-06-17 18:57 ` [PATCH 3/3] lockdep/selftest: Remove wait-type RCU_CALLBACK tests Peter Zijlstra
2021-06-23  8:19   ` [tip: locking/core] " tip-bot2 for Peter Zijlstra
2021-06-18  9:23 ` [PATCH 0/3] lockdep: PROVE_RAW_LOCK_NESTING=y fixes Joerg Roedel

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=20210617190313.322096283@infradead.org \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.