Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2422818pxb; Tue, 23 Feb 2021 06:48:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO4tMR4eiR5s1+1y0UyyRZSuJiVnjiQ32W/uWCtnBtFPv5MESdmE6EHbpIQVnipx6gQP5+ X-Received: by 2002:a17:906:8474:: with SMTP id hx20mr6409599ejc.129.1614091694117; Tue, 23 Feb 2021 06:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614091694; cv=none; d=google.com; s=arc-20160816; b=af/NOCzBftHpnLZJ62Pcb5EyRq/AyHG1JfMANwinSaFdQfBTmgp+dAvXT39cgrO27d mH4X+9F0X26wYUjrj76uMDaR7HnBCca7kRUgoDj34vXsQIqa8T2eMib21psI7i8Sf4Sf 6vSBjaoY6Nip6LuX8yoxz2e7DaQf2hh65WKn7/zVNmP/dBBOdRTBLM0xjECxL6ulLl1P U64NjZQY/jYewvIpPz4Sqa9dowvdhkNnrNtUPCsC+34n29Yh2Gd/mRQK3MnnTicjMFwN enwfhARJYtEvSGdsD6nGJ46uC4P+8Beg8x0rXT1uU845MHiNtklY3EsiW7pI7INJ6NuE PBRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=VzTN7zIIE4/8D9vTZDJiCxOd1/gCyd3XlCjlnumqjY0=; b=ARl6NJx4uWNyEpJfCaF1rQItEAsnN+QrLsXFK/S2l8zXzxX2XUEPrT9g1f7TQhYC9A OdbeQCM3pjtV7J5eX1vzY/AGpVpt0czWnGOmMD6gLKSJtcpR53jNtZLrt/euKgmEJWAU 2xwOmt0/5DhdGYP8cFbpn2/vIOYj0jgOSHO17+867ec6C7SPi/6BtJlhUahXzjAF/yV6 2nStQTvjA6SB2Iduwi4eGDraaGLPG+Bl5ok7dCIejhXuvz5Jg6RufYxXcvSmqjpN+Cfj m6VuQEQaPHp/pnDUFyInlwbgtnZDCZjVCWqPqyCS+JdT9oKefr8nB5CESHKnNj9FPwE4 /yEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TcJLwYrY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo25si14354115ejb.288.2021.02.23.06.47.47; Tue, 23 Feb 2021 06:48:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TcJLwYrY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232995AbhBWOUv (ORCPT + 99 others); Tue, 23 Feb 2021 09:20:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbhBWOUr (ORCPT ); Tue, 23 Feb 2021 09:20:47 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35C5C06174A; Tue, 23 Feb 2021 06:20:07 -0800 (PST) Date: Tue, 23 Feb 2021 15:20:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1614090004; h=from:from: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; bh=VzTN7zIIE4/8D9vTZDJiCxOd1/gCyd3XlCjlnumqjY0=; b=TcJLwYrYH2ngitGvAMieIsqEJBU3uQvxle0gB/TyAU4nQv+VjdZJZERTNGOb33iOUkfrYw 9bxOaAl96IE04FaGdJSuaUniZkWFzVoEq9JOxaG0r+WI4TlObUf7EWu+hudQElgkias7AB eQa6m6hziHR06h/hJYKlVW6PPuPl0eaWHcdQg9vqhPwUFWoALqki2bww04Tv2gPsvi83ma 5NSJNzTJTj+61q9Wexp7ck8fVUUq3bR0uAxtJa7ql6KB9efoSvjv6HjRy84V9w/wfwKUVB H+1/XOJYBzY7cXqd3PrcEz/BG/8OwLV8CEHs+Zawsu0RraA1qXwQprS75wV/2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1614090004; h=from:from: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; bh=VzTN7zIIE4/8D9vTZDJiCxOd1/gCyd3XlCjlnumqjY0=; b=AVtug7zRAi97ZP1EOJb4Sdhlh28PpPwHz9v8+sk3UVvbFjN0sJ712qeNCCCnlFzL+uKC2a 1E3HBwEwrbXyv6Dw== From: "Ahmed S. Darwish" To: Juri Lelli Cc: Sebastian Andrzej Siewior , linux-rt-users , LKML , Peter Zijlstra Subject: Re: [RT v5.11-rt7] WARNING at include/linux/seqlock.h:271 nft_counter_eval Message-ID: References: <20210223110015.ybl7feu43wvtjoqu@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2021 at 02:53:40PM +0100, Juri Lelli wrote: > On 23/02/21 12:00, Sebastian Andrzej Siewior wrote: > > On 2021-02-23 11:49:07 [+0100], Juri Lelli wrote: > > > Hi, > > Hi, > > > > > I'm seeing the following splat right after boot (or during late boot > > > phases) with v5.11-rt7 (LOCKDEP enabled). > > … > > > [ 85.273588] WARNING: CPU: 5 PID: 1416 at include/linux/seqlock.h:271 nft_counter_eval+0x95/0x130 [nft_counter] > > … > > > [ 85.273713] RIP: 0010:nft_counter_eval+0x95/0x130 [nft_counter] > > > > This is a per-CPU seqcount_t in net/netfilter/nft_counter.c which is > > only protected by local_bh_disabled(). The warning expects preemption > > to be disabled which is the case on !RT but not on RT. > > > > Not sure what to do about this. It is doing anything wrong as of now. It > > is noisy. > > So, I'm a bit confused and I'm very likely missing details (still > digesting the seqprop_ magic), but write_seqcount_being() has > > if (seqprop_preemptible(s)) > preempt_disable(); > > which in this case (no lock associated) is defined to return false, Preemption is disabled if and only if: 1. It's a CONFIG_PREEMPT_RT=n system 2. There's a lock associated with the sequence counter 3. That lock is also preemptible (e.g., a mutex) In your case, the 3 condititions are OFF. You're on a PREEMPT_RT=y kernel and the sequence counter in question has no lock associated. As Sebastian summarized, the error is just "noisy" at this point. We will of course need to find a (mainline-friendly) way to let the lockdep splat go away for -rt kernels. But for now, it's not harmful. Good luck, -- Ahmed S. Darwish