linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikos Tsironis <ntsironis@arrikto.com>
To: mpatocka@redhat.com, tglx@linutronix.de,
	linux-rt-users@vger.kernel.org, msnitzer@redhat.com,
	dm-devel@redhat.com, linux-kernel@vger.kernel.org
Cc: swood@redhat.com, linux-fsdevel@vger.kernel.org, dwagner@suse.de,
	bigeasy@linutronix.de, iliastsi@arrikto.com,
	ntsironis@arrikto.com
Subject: [PATCH RT 2/2 v4] list_bl: avoid BUG when the list is not locked
Date: Wed, 13 Nov 2019 15:10:42 +0200	[thread overview]
Message-ID: <20191113131042.7719-1-ntsironis@arrikto.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1911121110430.12815@file01.intranet.prod.int.rdu2.redhat.com>

list_bl would crash with BUG() if we used it without locking.
dm-snapshot uses its own locking on realtime kernels (it can't use
list_bl because list_bl uses raw spinlock and dm-snapshot takes other
non-raw spinlocks while holding bl_lock).

To avoid this BUG we deactivate the list debug checks for list_bl on
realtime kernels.

This patch is intended only for the realtime kernel patchset, not for
the upstream kernel.

Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
---
 include/linux/list_bl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index da38433240f5..3585b2f6b948 100644
--- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h
@@ -25,7 +25,7 @@
 #define LIST_BL_LOCKMASK	0UL
 #endif
 
-#ifdef CONFIG_DEBUG_LIST
+#if defined(CONFIG_DEBUG_LIST) && !defined(CONFIG_PREEMPT_RT_BASE)
 #define LIST_BL_BUG_ON(x) BUG_ON(x)
 #else
 #define LIST_BL_BUG_ON(x)
-- 
2.11.0


      parent reply	other threads:[~2019-11-13 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 16:16 [PATCH RT 2/2 v2] list_bl: avoid BUG when the list is not locked Mikulas Patocka
2019-11-13 10:29 ` Nikos Tsironis
2019-11-13 11:16   ` Mikulas Patocka
2019-11-13 11:50     ` Nikos Tsironis
2019-11-13 12:05       ` Mikulas Patocka
2019-11-13 11:18 ` [PATCH RT 2/2 v3] " Mikulas Patocka
2019-11-13 13:10 ` Nikos Tsironis [this message]

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=20191113131042.7719-1-ntsironis@arrikto.com \
    --to=ntsironis@arrikto.com \
    --cc=bigeasy@linutronix.de \
    --cc=dm-devel@redhat.com \
    --cc=dwagner@suse.de \
    --cc=iliastsi@arrikto.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=msnitzer@redhat.com \
    --cc=swood@redhat.com \
    --cc=tglx@linutronix.de \
    /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).