Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp451252rdb; Thu, 1 Feb 2024 13:24:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4xeFjhTdhzljDKo+Ta8Gp29GgEH+CNJhLpBuKZaelNa5b/UrqUqmzXniqVCLhotJyygEF X-Received: by 2002:a17:902:d544:b0:1d8:d396:47d7 with SMTP id z4-20020a170902d54400b001d8d39647d7mr349724plf.47.1706822697927; Thu, 01 Feb 2024 13:24:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706822697; cv=pass; d=google.com; s=arc-20160816; b=DpLGF94iEig2T+2U6QebyuKcwW3Nchu6xaDdANNtWrQ4xi4q2Zr1YTz51U9UFrxxF2 8VBCnBf7+HMPkeS+7HiwAbPkrCqfCFNajnLBffu7IjbHZd82S7KQtfXYCWZmTkPRCjd4 9+6UF1mFV/A4vzxMwsBMqPhRwiqO9yJsviKSKWXrabNdd3q344G4dHNqwMeu3sjt08bH cxkgojnJeHKH/duTAFFnUEbyE0PmOK20D4PEqq05DUvRdfrSAENnaNGpzswSFDwdHaIl QD24D3SdDxvlRZ+4uGnwdvpvUecEEcwwNRezCiKOnQt4RYszMAHiIBFwLZvBjgNYQNxp FWaA== 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=9uUJXhA0Mx1FtW0QJpxwfhhn/2x3T3FnROkEbGKlTmE=; fh=wMWHaNUc1VwLQDjzH+BHeZUyDcIan74NYxow4KR5tP4=; b=v+8DLRGZdtb+KGqgmeZamY1YixO/9qeG5S87WDIzBMJZoA9nNEU8+HARWLVte/z0v/ mNSZaXHy77rQ8VI/sJCi+3cjQqttG8qrzqdPWndmC71eZ/rlPtY88h0uxI1LU8z1v70M f8QPOHxXfD6/RU5ZXnxBmfW8TKkXjx4D4weucVSOdXqhxP7UYN7X8txxiEzinCHVaDAh fLOaNGC7UK4Zvl2a3RCFR8MC14tcdo8Tk+ANcYv5bZmlAuxgMaemR8tAaqQO7peP730Q SmzOxHLXS58FUoW12/tv61iZMie4+arnIUl1wr+1ouKV0te8bRIhAacdpehNNCHmHLJB Jfrw==; 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-48872-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48872-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; AJvYcCVmAN0kwRFglBzXqvbUebbZGOjEWm5XytOhKD1GcfIbwRwOiMOo5c+mH38t568GTAhlhgqUNIsZhaKGnGMLAp3tHkgIgcANj4rUndGN+g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q16-20020a170902789000b001d720fe91basi412705pll.389.2024.02.01.13.24.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 13:24:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48872-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-48872-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48872-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9955E28AF2D for ; Thu, 1 Feb 2024 21:24:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D19F73D0AF; Thu, 1 Feb 2024 21:24:52 +0000 (UTC) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.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 18AD63CF5B for ; Thu, 1 Feb 2024 21:24:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706822692; cv=none; b=bx96G9AA5S4TxgfPAYev2VhNkCfH3wzXn4sh+nghBRBFZt9t18lnspJ8n0WmtWHmK62R8F96xLMLvaBky6y21swFVKkVHJwyX7Z+jXqNRLH4M2/mRWCxmQTJARNf87gbu//ahP5TxBwIkcmD9GVe6FdwfG2W3etHm/GVW3Zg5hs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706822692; c=relaxed/simple; bh=D3ieI5eypbMKCesfhR5+rcxs0f229+5nQ83JMronJuA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZghigOea4b8LTU0CDbYOG0sBIbcogyclFvDyRQTPzrAJJrEvZrKe/liR5LIiqgr96/S73pHSs7pp1XdNSL7H8sSB2D1FH13fmty2j0pugydxTBiK/zmTu4okapWFTaY/nbCBi6aNBk8UT2M5kcg27MWgxcD2foBrBB7vrAGR7sg= 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.215.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-pg1-f172.google.com with SMTP id 41be03b00d2f7-5ce9555d42eso1242599a12.2 for ; Thu, 01 Feb 2024 13:24:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706822690; x=1707427490; 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=9uUJXhA0Mx1FtW0QJpxwfhhn/2x3T3FnROkEbGKlTmE=; b=D9ayIOoJnhwh0ePcaSc26d7MpmDXEZAG8QxqYzD3hCiRybEMAzqxiNSIafm91cDvAg RAfPBxvfUHQsgDyk+aXTxouG6xj8Yp5kHzmV12JxltGz0TtJSTkFI79RookUNm4SpOFM pLsSQoUVBjB+27WKF0y48zUTnH/wE6oBMZRncD4gFZsy82IkF31yCza3vdUnOAPbIP5m 42JITj/16jXo7x1mJBMNRvu+sY9roPpWCD6+vBhxnM4M5FKoiMXAcWfjbonlTAEh9qC+ idazlYlCH6DStfPgGmBblemIxYPhromDSabI2K7XRr1LetLtJDM4OB4NBL2uFPJu45ZX +hEQ== X-Gm-Message-State: AOJu0Yyky7ep58ZJKmYQKmGQAtgeuslmY83USBo+ZbFjzjxtK0PLtPMq nvsCVp1ndxHrdCT1lR9BCbMPThuTG2GWH9bv2mO8ZVp9LsSgu+vWSQRbCeo4 X-Received: by 2002:a05:6a21:6215:b0:19c:a00c:f1f8 with SMTP id wm21-20020a056a21621500b0019ca00cf1f8mr84650pzb.23.1706822690268; Thu, 01 Feb 2024 13:24:50 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUr530zBV7HXGGzTmLYi6wuhRrbZ/E3+vPHB4Fi//CL2Qs81/IcYc+njkWRtN0lGoBt7WmvV4ttase9mtP6c0zkYWVWLUANnScQAPFPrWyBHgzG0WVwyk7b0Lk8KhjcgWb5Vk8hHtJBcZfj4r8a4w0iFDvCQH25+BQ8lp/SedLBBTNACSEvBjJwz4YyEUrwyorNXExojjcgIgo77vbOxHkpGOwG9XGrp5JbTF/txG0xwtgoN0ew0vHi9ei1/W8Y1qtaWVvCTKNwQtaZCn+UW8ppdwml1hi2aUIAsRXHH+oo9/S0GkUh5cwBCeY+cveVv/InIg2zTyi5vX4MSTpBQu1hdPO4Euf0YjQSIwD/ Received: from ?IPV6:2620:0:1000:8411:170e:a1a5:1887:adb2? ([2620:0:1000:8411:170e:a1a5:1887:adb2]) by smtp.gmail.com with ESMTPSA id lc22-20020a056a004f5600b006dae568baedsm205548pfb.24.2024.02.01.13.24.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 13:24:49 -0800 (PST) Message-ID: <1f1691cd-fcc8-4a0b-9d63-bff15c5a52ad@acm.org> Date: Thu, 1 Feb 2024 13:24:48 -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 , Greg Kroah-Hartman References: <1705477714-10467-1-git-send-email-zhiguo.niu@unisoc.com> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/1/24 11:48, Boqun Feng wrote: > raw_spin_lock_irqsave(): > lock_acquire(): > __lock_acquire(): > validate_chain(): > lookup_chain_cache_add(): > graph_lock(); > > Basically, every lock acquisition may lock the lockdep graph because > of dependency checking. Wouldn't it be simpler to make __lock_acquire() return early if this_cpu_read(lockdep_recursion) indicates that the graph lock is held? Thanks, Bart.