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 F3EB1C77B61 for ; Thu, 13 Apr 2023 14:49:06 +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:In-Reply-To:MIME-Version:References: 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=+HrR8WLwxPTEDma04EMQA1yGNTEDQlNxg7FnHRhMpyU=; b=aad1VvGbp1WG/j +oNL7zyaS97Wwjiuhy6ZenGJYK9vZZZLlkLzrrU5fFfAj7rhFkDIiw9wOItJq8zCgFDoC9TKY3yXv o9abrjbtr8GzwvimuSaB6I6hd4/5S7I7Ew14rIoRMwoh5xq6T73tFpNmYKias3N8VNOeklJKhzEwq ZjCjWvJbMuZbSFtXPcg78EP7x7AMTBUwyJ9X1Pk7jF0HKILRvOTeGw/uDKLASMXUN2zeH6sy0IdEN fWmKqPp5aD1rOtD/IVHKF/ll64A0YEs44bqqQFABoeT+G26WK3vbcwpRAzOIqw4SiG3krKA2D4wGd 5m1rsVtOPb1RZfaDjQug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmyFB-006RVf-0P; Thu, 13 Apr 2023 14:48:13 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmyF8-006RUW-0D for linux-arm-kernel@lists.infradead.org; Thu, 13 Apr 2023 14:48:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1713B63E88; Thu, 13 Apr 2023 14:48:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E9F0C433EF; Thu, 13 Apr 2023 14:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681397288; bh=ugl8yGbnDmkq/AT/cxdFkf+RlcznXX7JwIhOX/bHntc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LtTfVHi6EGEWOf6Ef8F+4GLCKXltYxpcZ1vzc2p8nl04IBXpLXpF7LuvmVusxLjLb 8/CllB7GUHeKvyoWtRPH4JwrE8kfouU7snTx0eBfGbkxOVb4spAB8fuXToi+bSkcFL 6WFl1lEWZUOtgsCX8xKAAJpHPA0EdJfJgIvQEHT6hPVzoQI96FIvUHU0pZz+lOaPlI F1ZX3/R3B4s3XzFblxNFakqtqC8BCfPKES6iFFDPLJ8xkscGd8xNW+wHHYLf5b4UCT LW8clz7NBfjUZNWK+nMTE5+XnBQOOuMp4j0EmRWQPWQHGeG5riLTS7qrGtfZ9qHeSS B1XV93+R4faCQ== Date: Thu, 13 Apr 2023 15:48:03 +0100 From: Will Deacon To: Lorenzo Pieralisi Cc: James Morse , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, catalin.marinas@arm.com Subject: Re: [PATCH] ACPI: AGDI: Improve error reporting for problems during .remove() Message-ID: <20230413144802.GB26421@willie-the-truck> References: <20221014160623.467195-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230413_074810_180282_85A17E4A X-CRM114-Status: GOOD ( 38.04 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 13, 2023 at 10:23:50AM +0200, Lorenzo Pieralisi wrote: > [+Catalin, Will: ACPI arm64 changes are sent through arm64 tree] > = > On Wed, Oct 26, 2022 at 05:09:40PM +0100, James Morse wrote: > > Hi guys, > > = > > On 18/10/2022 10:35, Lorenzo Pieralisi wrote: > > > On Fri, Oct 14, 2022 at 06:06:23PM +0200, Uwe Kleine-K=EF=BF=BDnig wr= ote: > > >> Returning an error value in a platform driver's remove callback resu= lts in > > >> a generic error message being emitted by the driver core, but otherw= ise it > > >> doesn't make a difference. The device goes away anyhow. > > >> > > >> So instead of triggering the generic platform error message, emit a = more > > >> helpful message if a problem occurs and return 0 to suppress the gen= eric > > >> message. > > >> > > >> This patch is a preparation for making platform remove callbacks ret= urn > > >> void. > > > = > > > If that's the plan - I don't have anything against this patch. > > > = > > >> Signed-off-by: Uwe Kleine-K=EF=BF=BDnig > > >> --- > > >> Hello, > > >> > > >> note that in the situations where the driver returned an error before > > >> and now emits a message, there is a resource leak. Someone who knows > > >> more about this driver and maybe even can test stuff, might want to > > >> address this. This might not only be about non-freed memory, the dev= ice > > >> disappears but it is kept in sdei_list and so might be used after be= ing > > >> gone. > > = > > > I'd need James' input on this. I guess we may ignore > > > sdei_event_disable() return value and continue anyway in agdi_remove(= ), > > > whether that's the right thing to do it is a different question. > > = > > The unregister stuff is allowed to fail if the event is 'in progress' o= n another CPU. > > Given the handler panic()s the machine, if an event is in progress, the= resource leak > > isn't something worth worrying about. The real problem is that the hand= ler code may be > > free()d while another CPU is still executing it, which is only a proble= m for modules. > > = > > As this thing can't be built as a module, and the handler panic()s the = machine, I don't > > think there is going to be a problem here. > = > Thanks James, I think though that's something we may want to handle in a > separate patch. > = > This one looks fine to merge to me: > = > Reviewed-by: Lorenzo Pieralisi Cheers, Lorenzo. I'll pick this one up. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel