Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2883045lqp; Mon, 25 Mar 2024 11:55:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWG0nODxqjU5OsF7ffBaeAoG6w99XFx4kZ/Zbru6HjyfmuPDuYfYd/c6JKuB0BUu+kmW3OGSF6mva/H8r+8OnQpG6C395N9o1Bx6jvuQ== X-Google-Smtp-Source: AGHT+IGF9Qxf4TdNYQrXyjaxMU2pykWwdg3ogrxznGc+vo7zJ/wW6Cd2u6HiVA8kCHmbhsR68pe2 X-Received: by 2002:a17:906:364c:b0:a46:f99d:1af9 with SMTP id r12-20020a170906364c00b00a46f99d1af9mr5425086ejb.1.1711392935536; Mon, 25 Mar 2024 11:55:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711392935; cv=pass; d=google.com; s=arc-20160816; b=mW0EJ5+F/csNNzP/5PdEhAnZEiS0O6uVE8Ju4I4XwVadUY+wTISQCuxjKq0MZ9qGD2 TbSpRn6q5L89QGKa19iaAVio/6DSYQ2DIVNRcWPIm6X2vuYk4m7eJn7l3vja+8xgQ36r IhVjP9rgUKhp1uz4kInJsaOfvj5y5SzfGGqe4tI0zHCmFqgAb/liAOPnm4zwLL702UZk 8KsdCYhmTt00bf5ri07WeuLlp9hhBB+nn21GVyfg3UQR1UVnvXpI8sYvT3jzA5nXv3Zv OZC7rhMW510KrhqPQ9KcU3ufU7OPH4qW+PrhYLqbi5jl4DAIpGFb4YiXck4HVrtcUg1q lE1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=93+FVeoSlMuZbiAXFBL3M9hpRZZSS6lI5Qvwa5nPKIQ=; fh=qb7/UQARZeRoCdXG0X0pzDjA1dT+01OSCxtFSjM8RzE=; b=DJ6MxscgjfRNxMp4K/mmN5diFu1m23Qj3PEP4MBkZn1sPiOm7kKA6gGvLjOfAF3bVB 75jfe6t2ZTkmU2/pG3/kHLUckiRJTrL8SGHsuuF84Nn57jNBnJw5tZ6H2hj8mFuFIpw2 gusf8LN+4a6Bae+xoZ9kH+y76LBEipOrgXUvoFRyWtDfGDd3BlWirae6sn4GwoHUpMFb 2BMDlYk9OD9N/qmBHn+BAR+z5ffxqecIksI6mL0OzO5yzVO8gG+AXwKQYm6yD3vn/9vs BhaYJm36UyMFAguygjO0oilBCzcP1fpKY4QX5TvAi5qcpJJ2xkOXzFFklfGcmo03AWgx nuQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=oe+TD6tI; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-117742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p6-20020a17090653c600b00a463eb97691si2827125ejo.350.2024.03.25.11.55.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 11:55:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=oe+TD6tI; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-117742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 243671F675D2 for ; Mon, 25 Mar 2024 18:52:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 249F21F19A; Mon, 25 Mar 2024 18:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="oe+TD6tI" Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DC11DDBC; Mon, 25 Mar 2024 18:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711392204; cv=none; b=Gow2/ENZ3lg67UwEPq+UejJMmL43FFpWkCVRqa+gfNUsNKXipVeUENmVsA209wZmrBCbDQlRbpKSqHRWS9rvo3O2bgSaHYD2J7UUzQTMd1aJKtnP99893LcbNlvoqXlueMq72haaokSR4LrGj2OS7HZHDZ2En4rueRNf4JLU1CM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711392204; c=relaxed/simple; bh=qdFHRwDn5Dpo4RgBgnFNgRw+jK2dyYCqGr/cxlrDXo0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=VmFQZHS+dussgZvcHJnKjYTrIplIpBgCzm9kXoUW8QrW/AYUyihIKpgJmQmcO5w9z/vkWJLgjOlGgVKKJFSTExa6ijlUghbB+26dgNlZ7TBDYeQwHJ/SGuDdirSz8E7495/AyIX8TatbyOvj0M0o/rxrt1LsuCYpq1OGnVPA1Jw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=oe+TD6tI; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=93+FVeoSlMuZbiAXFBL3M9hpRZZSS6lI5Qvwa5nPKIQ=; t=1711392202; x=1712601802; b=oe+TD6tIU9nP97EsS2YFuILRQtCwUnjTR3f+cm78QYmkkcA yMIYCnI65Szr/WICDCagpBFhlG2bJJyIJtH1p4T1qLz5AMao+5RGuHEN3FeQPQg3w/m4b0sb/klhn pltwbkEjgMvB+cIfCY4U2Z3ZdkzQTXW82SdgVZrt2FaUAIuQh8fPZMWZTy9e2qiOwKQ2rpcFKBHrP BasyQGH7acE1quLLK8mfPplPuSQ77VmJS6B8bwsEbaJR30XcCNDyxTG3OZQ37A6c2iKy2ADdrfFsO yiEh1zycWxE8/uHN92JoHoAt433DXFMtOEnShGRRaWo8iq52N0+HrHqvXz9fX4WQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1ropHz-0000000E2FA-2Tho; Mon, 25 Mar 2024 19:43:19 +0100 Message-ID: <48034addaeb6c33ca8b3e636262b6c043ddc5359.camel@sipsolutions.net> Subject: Re: [PATCH] rcu: mollify sparse with RCU guard From: Johannes Berg To: Dan Carpenter Cc: Boqun Feng , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Josh Triplett , Peter Zijlstra Date: Mon, 25 Mar 2024 19:43:18 +0100 In-Reply-To: <35355d02-3eef-4860-847b-b7bbf05f4a31@moroto.mountain> References: <20240325101626.41584-2-johannes@sipsolutions.net> <055111792727869a98c1fa693014e0b6f5d256ea.camel@sipsolutions.net> <35355d02-3eef-4860-847b-b7bbf05f4a31@moroto.mountain> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Mon, 2024-03-25 at 21:28 +0300, Dan Carpenter wrote: > On Mon, Mar 25, 2024 at 05:41:22PM +0100, Johannes Berg wrote: > > Also __acquire()/__release() are just empty macros without __CHECKER__. > > So not sure the indirection really is warranted for this special case. > >=20 > > I can add a comment in there, I guess, something like > >=20 > > /* sparse doesn't actually "call" cleanup functions */ > >=20 > > perhaps. That reminds me I forgot to CC Dan ... > >=20 >=20 > These are Sparse warnings, not Smatch warning... Smatch doesn't use any > of the Sparse locking annotations. Sure, of course. I just saw that you added cleanup stuff to sparse to allow using it in smatch. > Smatch handles cleanup basically correctly at this point. Do you "run" / "emit" the cleanup function calls there? I briefly look at doing that in sparse but it felt ... complicated, and then I saw the condition in the cleanup function which I thought sparse could probably not see through anyway. johannes