From patchwork Wed Nov 13 13:10:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikos Tsironis X-Patchwork-Id: 11252195 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0995B1593 for ; Tue, 19 Nov 2019 14:26:47 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0E77222A9 for ; Tue, 19 Nov 2019 14:26:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZSIQY2Ea" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0E77222A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arrikto.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574173605; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=cHTlLA7alXPDb1UnV7M5jhzT3INpcd7dkgeQV4+3jE0=; b=ZSIQY2EaD88GIiay/V6k3buhCbmvY0QB7cUTBKX4ylprq5s87RVOS3d6fVBETiLSwCoLJ+ TrCsS2qPk/3UTODG7qcd2xsbLTKao7qFohOOmkvcvHcfWFfrtbr/3W+bGLdi9ir9p6EV9U aC36nHz4Vjhf3sTydhRDAfQnCJPGqsE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-6wbKDYGRPSW3Gh2cwOnbWQ-1; Tue, 19 Nov 2019 09:26:44 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BAF28C0F71; Tue, 19 Nov 2019 14:26:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBA027BF8C; Tue, 19 Nov 2019 14:26:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5E1544BB5B; Tue, 19 Nov 2019 14:26:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAJEQY7m027326 for ; Tue, 19 Nov 2019 09:26:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2A2811758A; Tue, 19 Nov 2019 14:26:34 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 239B21758C for ; Tue, 19 Nov 2019 14:26:31 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 94FC21011A60 for ; Tue, 19 Nov 2019 14:26:31 +0000 (UTC) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-357-IoHySNzROWOF20PhiT4_Xg-1; Tue, 19 Nov 2019 09:26:29 -0500 Received: by mail-lj1-f196.google.com with SMTP id r7so23557954ljg.2 for ; Tue, 19 Nov 2019 06:26:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:resent-from:resent-to:resent-date :resent-message-id:from:to:cc:subject:date:message-id:in-reply-to :references; bh=APXfuG82A+VYQSkpqfeuJieTcNwnepuIQxnGzHt+UyY=; b=OQJm5Mg1wftRc28mwC+kJ2oXAplV3xgubH6ogSR07uKtj8r9wN52CgIeYWYmr9XJv1 XDDrTezoQXV/BQlDuT1GJ7UbllBLN0AJwtsD7qPMx4whGFlBvoqXxXER3PH2PDZ+mbP0 EpTIUBAygpeKoCmt3wt+3zvopFplS5DzVbRK1lHGUKpNwE4OSEVuIuEUYcUO5o/8Fz0I 7SX+gKYlEBIwBLiKuxfA0ACBv6C+0I5ysxno5YPINnxZroSoxosJRFBhnouxZvQfjlIw CTTnJe7uU64atWRFzDtwIpYaszQwFXolXMVeCiSA3vePObZs0fhEDv+tnojQWOmPL+3o 796Q== X-Gm-Message-State: APjAAAW3RItCxJeRMNaYQdSSDIdpDZ0z4awd9OUAiisIXF9zPyDMkX5+ YLpfGRnx1fuiIG5BLlYKTG/DieWc+3w= X-Google-Smtp-Source: APXvYqxgY4FU7G/uUg1sYthe6J6xStARZ2od7ByuFkrI1xnihQKckIiZpAbQvBwHqy2CKJjSr8V0ng== X-Received: by 2002:a2e:9a08:: with SMTP id o8mr4374767lji.214.1574173587727; Tue, 19 Nov 2019 06:26:27 -0800 (PST) Received: from [10.94.250.118] ([31.177.62.212]) by smtp.gmail.com with ESMTPSA id r15sm4699308lfp.36.2019.11.19.06.26.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2019 06:26:27 -0800 (PST) Resent-From: Nikos Tsironis Resent-To: dm-devel@redhat.com Resent-Date: Tue, 19 Nov 2019 16:26:24 +0200 Resent-Message-ID: <14674023-9480-5344-3046-2041ed8efdd9@arrikto.com> Received: from snf-864.vm.snf.arr ([31.177.62.212]) by smtp.gmail.com with ESMTPSA id y75sm1070176lff.58.2019.11.13.05.10.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Nov 2019 05:10:59 -0800 (PST) From: Nikos Tsironis 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 Date: Wed, 13 Nov 2019 15:10:42 +0200 Message-Id: <20191113131042.7719-1-ntsironis@arrikto.com> In-Reply-To: References: X-MC-Unique: IoHySNzROWOF20PhiT4_Xg-1 X-MC-Unique: 6wbKDYGRPSW3Gh2cwOnbWQ-1 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xAJEQY7m027326 X-loop: dm-devel@redhat.com Cc: ntsironis@arrikto.com, dwagner@suse.de, bigeasy@linutronix.de, iliastsi@arrikto.com, linux-fsdevel@vger.kernel.org, swood@redhat.com Subject: [dm-devel] [PATCH RT 2/2 v4] list_bl: avoid BUG when the list is not locked X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 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 Reviewed-by: Mikulas Patocka --- 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)