Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp515835rdb; Mon, 15 Jan 2024 05:02:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHteCGpN7gRpj6/cWlqNWJ25X9ekvLTqROoLcfFBMPOvRW8Ijm1BsjsGRZOtDFrfxeUti+4 X-Received: by 2002:a05:6870:9707:b0:206:de00:b86a with SMTP id n7-20020a056870970700b00206de00b86amr1086195oaq.38.1705323756030; Mon, 15 Jan 2024 05:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705323756; cv=none; d=google.com; s=arc-20160816; b=eXYVP11+g1Zl6trqpuwvkbFWcUp8+AbtiTGwjEktFgjLtdQvdrUKgnh2w/SS59WbwO 7rAANMdsiZzUmtWR0CtdZGP8BXGY08rgVqQx1fEs2Jb7/soRA0M6fh0eNzVEjREgIUn5 yYMOya31LdKWWfxceYvZewLmGJPyPDZ6vL6xde/IOnlijNZEIOxggOOugIVB+1i7rRdH Q5wHxpM0EK3w5mDGxkZZRgaIo7B4Ik5ouDpXZw1LW2rUxclom7Rro3I/b3H71Hiulhc5 3ofkCD6tZICzssEO7OTZ8wvN0rGbCoJOZq5doImACtWH5YhpKj4pGwlpXuJYzx2vLmJj whJA== ARC-Message-Signature: i=1; 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=Vgja3QwbsginBkb9fFz5vBe4PtnzgUD0MWfXlTdmJmY=; fh=c1Gn2Fg0bid8pn0ADhDqIchPAAdGfa20grUhu9zOh/U=; b=Ze4V1OyyT80ypbX0SUGwQnAUR/QD3HZVF3FA1LJgCTslTnNsor72cFNQ3ErudF4GTl 0nGXwDQWMPK4VAXGf77YlHw1S4PvKG5MyJN68IH3BCazJ7UfSRRR41IIvIQW4sjWAXhI yjrYesEaE4C1B1Pfd2T/KpW2uQ8Bp2K+H5SZJWuJzJj12mv1d5odO9xeDPC9QExr06MQ 53LJwofiOmQre7vSSsuPjyAyWZzEh3M/+bmTJdWw2z2dv6F7jqqiujz0F81zl+k6izHK FlVP6zQfkMRhMSsWEsh11WITzoIvsG4cS1EwUPMPd1zEANNQtyy0GKbd99ruQszzbinT SBxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25989-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25989-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h6-20020a05683040c600b006dc8fe0b411si3036868otu.4.2024.01.15.05.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:02:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25989-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; spf=pass (google.com: domain of linux-kernel+bounces-25989-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25989-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 46D2B282715 for ; Mon, 15 Jan 2024 13:01:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E069171AC; Mon, 15 Jan 2024 13:01:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A930171A7 for ; Mon, 15 Jan 2024 13:01:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0E8A32F4; Mon, 15 Jan 2024 05:02:39 -0800 (PST) Received: from [10.34.100.129] (e126645.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DAFA33F6C4; Mon, 15 Jan 2024 05:01:51 -0800 (PST) Message-ID: <21e77238-4884-40ca-bc01-b7e4774b9239@arm.com> Date: Mon, 15 Jan 2024 14:01:50 +0100 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] firmware/arm_sdei: Fix invalid argument to unregister private events. Content-Language: en-US To: Levi Yun , james.morse@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240110090107.26323-1-ppbuk5246@gmail.com> From: Pierre Gondois In-Reply-To: <20240110090107.26323-1-ppbuk5246@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Levi, On 1/10/24 10:01, Levi Yun wrote: > To unregister private events in device freeze, it should call > cpuhp_remove_state with sdei_hp_state not sdei_entry_point. > otherwise, it seems to fail on cpuhp_cb_check. > I think you can also add: Fixes: d2c48b2387eb ("firmware: arm_sdei: Fix sleep from invalid context BUG") > Signed-off-by: Levi Yun > --- > drivers/firmware/arm_sdei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c > index 285fe7ad490d..3e8051fe8296 100644 > --- a/drivers/firmware/arm_sdei.c > +++ b/drivers/firmware/arm_sdei.c > @@ -763,7 +763,7 @@ static int sdei_device_freeze(struct device *dev) > int err; > > /* unregister private events */ > - cpuhp_remove_state(sdei_entry_point); > + cpuhp_remove_state(sdei_hp_state); Maybe it would also be worth resetting 'sdei_hp_state': sdei_hp_state = 0; > > err = sdei_unregister_shared(); > if (err) Regards, Pierre