Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1093234lqe; Sun, 7 Apr 2024 19:35:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFC8oWbizEcfLDwjxLTCVG3vJ14Sba7pXLGSL0XuObnwE5/aYmefjHuxj/omZYpJaeoCK0AbIXJA200IaMHsXWxpQPIncfGRHB8tokrQ== X-Google-Smtp-Source: AGHT+IHeW72O2W6+0PiOP99jbw7fD/HZsAvMjrBOyCogGz2GSzBxMQV8yDFkIA3vlOLVa/z1+GcT X-Received: by 2002:a50:9556:0:b0:56b:ddcb:bb67 with SMTP id v22-20020a509556000000b0056bddcbbb67mr6963249eda.2.1712543752957; Sun, 07 Apr 2024 19:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712543752; cv=pass; d=google.com; s=arc-20160816; b=GQryu4FGCj3nyJf5JFHa888B27dhSOFaCVqp6d4sYaGXHMGWrmtFZgDQIKtgeM5pyd W3zvuQ8aeqrZ6bCrBxIwC6xuKQ7t2YD72lCXroeTNcrwrLLjgQknq1JkANiivhYir4QZ rCCZONC+1K9C07GLz+xIsPqc6Nf8drDzzBtAv3ergDULOMl4o2sld2HRA+cVYEzbsuwo JgvU0Z7j+piqQKtWplZfSti69lSuQFnEU3aFozoGnzi1ARD8fmrLgxqFaVeez5xYf30/ 28O2w0odNnIeVrD7fpHNfK2VhruI3POEoQp+9DXIDb9p7xigC2elQJBeE5q5ZN9Xi1kM rxfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=CYcF3xviOioTw0bSRBXtITDLMhC0u3sV5C5DSixd4p0=; fh=xchDSsaZEWA96muea91cLYniO/PwJAp5rEPpVi05Ldc=; b=nxCnNnIat6v3RxtF4BVyRaJm1EAQzth94MYLQhVftnbscwebUbqzBOGf6hwZ7CEuW9 +LPEogZsSKtV5u+uxImttpj3Bc0s8s/w9igNUknpr6+bU6B7USFDwRYDxitJwGKEcapm ur7eqTZoS5zqIvpbUFmLfCuCIO5eQxtKiHJopBY7DKHRu8vYip8QBwx0cJZvLYDr95Ue AoWJRNgfaSXp51vnFDz+dUL8jdgvksSMa+XdjZAAwEypAuyKo2odPuwN+NOXs7gi0ntw ErwqN5sWvxn1tE6jNUed+PdyIgAES/MCAgKQGkMH3wkZZv5+kO+WVH7VeqW21TqMIPJx C+rg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="vL/D+LCF"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134723-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v22-20020a50d596000000b0056e0a2b296asi3207627edi.306.2024.04.07.19.35.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 19:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134723-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=@kernel.org header.s=k20201202 header.b="vL/D+LCF"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134723-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 AB71B1F213B5 for ; Mon, 8 Apr 2024 02:35:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 650451869; Mon, 8 Apr 2024 02:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vL/D+LCF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7E004184D; Mon, 8 Apr 2024 02:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712543743; cv=none; b=PLWdCQMzpiQdTkIS9zIAqcmG9Us3uQLo81HF9Elgg6CvBgVyJqLfWuCW2fk+fpk9wWltDIANynn8QzJE9C/NKSH2cW64AqV3IfkRz07QNy1K4i0MrUTJRdIRjvP0zyMAfjFc4jlwW16tcAelE9kPtjPkGzvBrW2WyBHW4NhykTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712543743; c=relaxed/simple; bh=CYcF3xviOioTw0bSRBXtITDLMhC0u3sV5C5DSixd4p0=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=c77M4cU6FA7vVcgwhEBP3gVMZIpA7tUJEhH3s+QtJzq00Xzwn9qJeq8m/phYnP39+aSn3uw6y0FJ1xiwPXlHjySTlhvpI7hTqVlrmUYEcuoi+1Cq8/eQOGzuhY5vv4mUZb0iFQmmfQQrDayuclZlkDYcabi9BVMxPyszzCJJYQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vL/D+LCF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA97EC433F1; Mon, 8 Apr 2024 02:35:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712543743; bh=CYcF3xviOioTw0bSRBXtITDLMhC0u3sV5C5DSixd4p0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=vL/D+LCFPI5gREdEQ/yKUOesLuqnXbdKoWGFiLaFBW3ZKPFzaRihMJCLedYvaVKKa Rasct69JPHDevWVLJLhw6YPj5adHXfRkZXbQQtwsOrvRywvfEYk30jljjIWO/BHpRo WO0hfG4I2jEBy5REK43t5efdRGgBHW53S1yLpM3yi7PoMQvf5A2k82dM7J5oKURjBT LmKYLuq/5+WYTy1xX6U0tbBtz4/TiPRB4hMR+X5/8xQzIobtAJZqdq5kz6pmcMTACU KRswV8C88ZqXPCB5WkefZG3/kygGTsXQWVtV2VUuJl1rbx9EbvSX68nF5jGzswPJJ6 hKjNcUWDjRkqQ== Message-ID: <07ff4ebb70e7b9edfa20e394fdba9244.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240325184204.745706-2-sboyd@kernel.org> References: <20240325184204.745706-1-sboyd@kernel.org> <20240325184204.745706-2-sboyd@kernel.org> Subject: Re: [PATCH v2 1/5] clk: Remove prepare_lock hold assertion in __clk_release() From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, linux-arm-msm@vger.kernel.org, Krzysztof Kozlowski , Douglas Anderson To: Michael Turquette , Stephen Boyd Date: Sun, 07 Apr 2024 19:35:40 -0700 User-Agent: alot/0.10 Quoting Stephen Boyd (2024-03-25 11:41:55) > Removing this assertion lets us move the kref_put() call outside the > prepare_lock section. We don't need to hold the prepare_lock here to > free memory and destroy the clk_core structure. We've already unlinked > the clk from the clk tree and by the time the release function runs > nothing holds a reference to the clk_core anymore so anything with the > pointer can't access the memory that's being freed anyway. Way back in > commit 496eadf821c2 ("clk: Use lockdep asserts to find missing hold of > prepare_lock") we didn't need to have this assertion either. >=20 > Fixes: 496eadf821c2 ("clk: Use lockdep asserts to find missing hold of pr= epare_lock") > Cc: Krzysztof Kozlowski > Reviewed-by: Douglas Anderson > Signed-off-by: Stephen Boyd > --- Applied to clk-fixes