From patchwork Wed Nov 13 11:18:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 11241725 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 D17F11515 for ; Wed, 13 Nov 2019 11:18:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FC3F222D3 for ; Wed, 13 Nov 2019 11:18:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VnqAsQLN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FC3F222D3 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.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=1573643899; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RyOlP0mrM7ELB65vSgBvBwq5wnKYw34ChJgTC7X74sc=; b=VnqAsQLNaeYmjcdeK98MimAhMXEpdyNP3Pu6ORbIegMUG7lv/RE94dwffJv7+5LeZy+aT6 3ZHNJkbm4ZUupkfVPBfPzp8YnUrH/AzM8BjqDi7shizOGRgcP/DBrI666A70K7vHZa8q1G 7uUCkSFCyvBG4As1Px5g0X3b2G7EnxI= 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-62-SRSz6yNVNXinBHtK3436Eg-1; Wed, 13 Nov 2019 06:18:17 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B50DB107ACC6; Wed, 13 Nov 2019 11:18:13 +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 8296828D33; Wed, 13 Nov 2019 11:18:13 +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 077EF4BB65; Wed, 13 Nov 2019 11:18:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xADBICBX032464 for ; Wed, 13 Nov 2019 06:18:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 457D3BA69; Wed, 13 Nov 2019 11:18:12 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4440D6106E; Wed, 13 Nov 2019 11:18:09 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id xADBI8gN023568; Wed, 13 Nov 2019 06:18:08 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id xADBI80c023564; Wed, 13 Nov 2019 06:18:08 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Wed, 13 Nov 2019 06:18:08 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: tglx@linutronix.de, linux-rt-users@vger.kernel.org In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: Mike Snitzer , Nikos Tsironis , Daniel Wagner , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Ilias Tsitsimpis , dm-devel@redhat.com, linux-fsdevel@vger.kernel.org, Scott Wood Subject: [dm-devel] [PATCH RT 2/2 v3] 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: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: SRSz6yNVNXinBHtK3436Eg-1 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 must set LIST_BL_LOCKMASK = 0. This patch is intended only for the realtime kernel patchset, not for the upstream kernel. Signed-off-by: Mikulas Patocka --- include/linux/list_bl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux-rt-devel/include/linux/list_bl.h =================================================================== --- linux-rt-devel.orig/include/linux/list_bl.h 2019-11-13 12:15:50.000000000 +0100 +++ linux-rt-devel/include/linux/list_bl.h 2019-11-13 12:15:50.000000000 +0100 @@ -19,7 +19,7 @@ * some fast and compact auxiliary data. */ -#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) +#if (defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)) && !defined(CONFIG_PREEMPT_RT_BASE) #define LIST_BL_LOCKMASK 1UL #else #define LIST_BL_LOCKMASK 0UL