Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp569815rdb; Thu, 1 Feb 2024 18:14:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHU28hT2YEg/Npupt3/0Rvp0TjvRcji8f3+9HZu8k3hlc2bsd/hsBsJw/S61IiV7A7UAHpK X-Received: by 2002:a17:907:7808:b0:a37:1011:5895 with SMTP id la8-20020a170907780800b00a3710115895mr15329ejc.4.1706840049181; Thu, 01 Feb 2024 18:14:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706840049; cv=pass; d=google.com; s=arc-20160816; b=tI8yf3x6uwdGaKwxNPz9BDETwnPW4sx7fRXAYzP5/GOKkQPQqw6Ser2d84a5j2ekQX ZRE/ye4+S1W8ELRqCw3vjFZ6/Mu4gw+9ER8guP0mNH91ewLo8FF3WokPStFDUDf/UaJE W7qJoBJuSERV/N6SvKeUPIf7/Pn2rFBrjviSlnx6B0+g10swibBdSMEc8j/WH5+s6aGQ MRDFSdXncyaSM8JqIskB3DPHMqeXheQVAcd+JHSbAnwLgYnXReh3NcEiP0Y0eDr6Ky/x eaNbpBXLW8l16z3Pd4qUz5gCW9lxp932QYbP1BevAxIZETQLAMQn2Et1ZxH2oRzNXTeH QMQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=CJPfleRqllGEzdFlU+h87ytjQ1VtUOoZphhjUjlezJM=; fh=wsbHzSBZmu85W838yVuaVM2Nl1Q/PwzT56QMiiK3kOw=; b=smyid6UhBtC9x5URT5Dz3Hc/Y6nXCc2hcvx19XWQ6GTssB44Q6PKA1pL21SYM8txfe kpv6xctD92iWlbjnTahnLalJY4HmZBnCcOXIesIJrJMLA8GhNpgQrx1cJoKOGwtrii2K aN/aeq4Og8pGs36Enor4i4q15cMmKiWFXDNKsbchloJxy3weiuk/PcrhM8zBEhlx8GuM g5Y2QyaXJ2BEE+pbgunk+/OXSk2vbauD8cBs6BlDVtjJMWALDplYR+HfE7tJA3R9cjbi vjcdid7duLeQEqYzuvCIhV9nk/f+QzCUbYn64BhRwpPCRHC+jSzpDbLSWVCgLdb8vJLc E/dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-49082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org X-Forwarded-Encrypted: i=1; AJvYcCWlT2YJEjLSL2uTUc6iyYjJpOWm1IrXVD36nJIZtc8HhLFuCpxuNbpO8+73Fg5kqU7E9P9YLXJjACWMozYtf1zLUaWuv3/jq82UvOXtxw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i9-20020a170906114900b00a36c3925974si361287eja.538.2024.02.01.18.14.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 18:14:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-49082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org 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 E94A11F256E0 for ; Fri, 2 Feb 2024 02:14:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E8A0BA25; Fri, 2 Feb 2024 02:14:01 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C56C8C08 for ; Fri, 2 Feb 2024 02:13:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706840040; cv=none; b=GE4VIcRT+f0e0q+EF0RiOyh905R5mPIPGFQUQYHXEUkqmWlWAdjYHsjtLKZqTT/7qOWAMdt3hlBb7WqN7fUVNV9AZp4Zd5cbGWlvCgiCiIiFoBGm7VxO6th4t+JwoxV4GcYk9WEhJOQ9zvkXs4aAOEPk/7pbhaIpz3t46pmBl50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706840040; c=relaxed/simple; bh=sNS8usbEtbDf7LpbeSuCpxUU9imPhuQu5zZPRTiQCVE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QzbtiTh2YiHbEUQl5N0da5nREPVkW9ShrG/WNa1v4H+ZjxuhV6nr2pUPg3dWKKH3GMOhrAsURJ9Itj+e5o36j+WK2MLogLsYVp829p0b+xMFxMdsx6As20tvg/ywtiBuUk8NvENfu8GI8rThNAQxr6gzax9ijbEhrGDkdgb+ZVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d94b222a3aso12701005ad.2 for ; Thu, 01 Feb 2024 18:13:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706840039; x=1707444839; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CJPfleRqllGEzdFlU+h87ytjQ1VtUOoZphhjUjlezJM=; b=gADHdQpzzCetbKSZVDUIWfjXA8es8EODtDYwPsZQEl92LNfZ5+OAHpui/Ey73cT9w7 Sqwsb8MU+Dz45hr4ssnMagDXuYZRRcFYqrp/Lcmy6XXDEg7JK5STBHPdZGwQeVegx5P0 wHh23f7B9iHbp9HZxXVLsMyXV75Nnw6iWLnatjPGMnou9NmS7qLXGdtWlAU0DMPfaLHB F3XHgoK7evdsudqYENvzLVQHALdvEaAXbYl3f+L42AHA7Sx9M7V/PvamJDeh9zSSj4T+ pzNhbUXJkChdeozZCMyIHfaQOVVSEId7w29RN1g2bvoaLQGmrDKQ6ec9LhdJiv8aT5cD R4Kg== X-Gm-Message-State: AOJu0YyDPgcjQxpBN6gQfvU5aIC9nG0IubFCoQSSDaKy2ac00siuI0t9 AZVhLORSu47/Ay4IHRiX502kANzACLjVeqFxUfL7/ezIaReoGXJD X-Received: by 2002:a17:902:cece:b0:1d9:4ebd:b954 with SMTP id d14-20020a170902cece00b001d94ebdb954mr1041336plg.45.1706840038529; Thu, 01 Feb 2024 18:13:58 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWTUlRMuVSDk+1oD09IbiNEsgyNqFn5S5JnjESwipbYXBU0QdnDFz4ISmTq5Z3VuWjF7SUgsFxBAr7q82eecCRayHNWtIcnACxHyXbi94K036r7lqed82o9PzKU0G3hH4N5fkL/wzqqPdWcLt5Xboiku5SN8ys0SQNhFqRG3iJuPvglG2tjn03j5tILCwxfkpN0ZsLi+rK/sReydT/rRlKj0rNDYCozjU+zVVWwyNq58OYf6rS9iwy4FqIzZO3g1MIFuoZtWeA+DzQ2YPtYunxYHllEgX/3oOc+WlLODQes7Fqq8+3GTIdVvf4Itv9OGO0= Received: from [192.168.51.14] (c-73-231-117-72.hsd1.ca.comcast.net. [73.231.117.72]) by smtp.gmail.com with ESMTPSA id i8-20020a170902c94800b001d933201459sm493164pla.77.2024.02.01.18.13.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 18:13:58 -0800 (PST) Message-ID: <891016e2-0f3a-4617-bb8e-a2a3af0f78c8@acm.org> Date: Thu, 1 Feb 2024 18:13:55 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2] lockdep: fix deadlock issue between lockdep and rcu Content-Language: en-US To: Boqun Feng Cc: Zhiguo Niu , peterz@infradead.org, mingo@redhat.com, will@kernel.org, longman@redhat.com, linux-kernel@vger.kernel.org, niuzhiguo84@gmail.com, ke.wang@unisoc.com, xuewen.yan@unisoc.com, Carlos Llamas References: <1705477714-10467-1-git-send-email-zhiguo.niu@unisoc.com> <2d1f4f16-6d66-4449-a7b7-5e2b2a4eaeb3@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/1/24 13:53, Boqun Feng wrote: > Have you checked the change in the patch? Now call_rcu_zapped() has been > splitted into two parts: preparing the callback and calling call_rcu(), > the preparing part checks and sets the delayed_free.scheduled under > graph_lock(), so only one CPU/thread will win and do the actual > call_rcu(). And the RCU callback free_zapped_rcu() will unset > delayed_free.scheduled, again under graph_lock(). > > If you think it's still possible, could you provide a case where the > race may happen? Yes, I noticed that call_rcu_zapped() has been split but the first time I took a look at this patch I wasn't sure that the new code is correct. After having taken a second look, the new mechanism for deciding whether or not to invoke call_rcu() seems fine to me. Bart.