From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87B08C678D4 for ; Tue, 7 Mar 2023 09:44:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=47tGRIWBG6vSTAK3hH5erS+DlEzbkmJHM3zcZ4pu1z4=; b=TPVM+0FgFhgZuw t/Y/SwXCcuw4PkPVTYFeWAZFPxLbVke7TOtFridE1zKASp199Q7mNJ5Hll+YbuufYrib/dexiNya4 ZTQ0CDTxpOxTEUOALqobCo+2e+SBQGrBnzC/HwCYEB+ZjDJN5aQE/e9do05hHtJ/nwfqDqHknjn72 /aKZZnhCHXVGIviyABR4YqrMi1TK+rWWsvSEiktwOFCaYkVuHGVXw7HBSUzJJtfRFJe+TK7OBWD+2 b7L23EymmvElnKEWWeMs5w0hfWlLRMGRh7sIuTzlPMiCG6wJYrsYs53tH9SM2k9I6eqKnOiHqgoKp 4oAdiIAm2J/coRvEpGJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZTqt-00Gz18-E5; Tue, 07 Mar 2023 09:43:23 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZTqp-00Gyzu-9q for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 09:43:21 +0000 Received: from booty (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id AEE37E0005; Tue, 7 Mar 2023 09:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678182194; 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=fBXMFy24pB1L3M53iT14RCAKjfqpFvZO6FaFdhmAFPk=; b=gVTSj14MgoBG4gs3EBb/yS4z1UVGC9WxSCIkJr4xV9QLRIAWT4/qYoadkpXoySXjOiMDO5 TFbuaNtobklneO5eVFomlh1zHpmNtpmaLafLZtFd+YONwhGkaZn2qfgNguB95FiyLrBF8e Y3729IfU6UNr94JzAgJWMqAOy1chLkJPj7nG6zA4Ll6Q/aBgHJiTiAl4WqFcxjtCD8Y26J A50G6X6U+5TMn8PQvoJ7FkW8mvvxC4l3jN7v5FtXKxpsOGIXEhDTXlHffEXM7fHSdohoUz VY2DDDCwyOy73TFdosMsPQXQ66tkdiS2Pfsmd60O20MbL0Hxf1IyoJClfNyTAA== Date: Tue, 7 Mar 2023 10:43:08 +0100 From: Luca Ceresoli To: Johan Hovold Cc: Georgi Djakov , "Shawn Guo" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "NXP Linux Team" , "Andy Gross" , "Bjorn Andersson" , "Konrad Dybcio" , "Sylwester Nawrocki" , Artur =?UTF-8?Q?=C5=9Awigo=C5=84?= , "Krzysztof Kozlowski" , "Alim Akhtar" , "Thierry Reding" , "Jonathan Hunter" , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 02/23] interconnect: fix icc_provider_del() error handling Message-ID: <20230307104308.3bd7b595@booty> In-Reply-To: <20230306075651.2449-3-johan+linaro@kernel.org> References: <20230306075651.2449-1-johan+linaro@kernel.org> <20230306075651.2449-3-johan+linaro@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_014319_533253_4DCF237F X-CRM114-Status: GOOD ( 13.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 6 Mar 2023 08:56:30 +0100 Johan Hovold wrote: > The interconnect framework currently expects that providers are only > removed when there are no users and after all nodes have been removed. > > There is currently nothing that guarantees this to be the case and the > framework does not do any reference counting, but refusing to remove the > provider is never correct as that would leave a dangling pointer to a > resource that is about to be released in the global provider list (e.g. > accessible through debugfs). > > Replace the current sanity checks with WARN_ON() so that the provider is > always removed. > > Fixes: 11f1ceca7031 ("interconnect: Add generic on-chip interconnect API") > Cc: stable@vger.kernel.org # 5.1: 680f8666baf6: interconnect: Make icc_provider_del() return void > Reviewed-by: Konrad Dybcio > Signed-off-by: Johan Hovold [Tested on i.MX8MP using an MSC SM2-MB-EP1 Board] Tested-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel