Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp588847rdb; Thu, 18 Jan 2024 12:21:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwc0WfZ5NTY71qQuzpPALX0qpvq98XC/ef4eWHy/hXWyt0pY7KF+woIBUbFPSXitxH4xtZ X-Received: by 2002:a05:6214:2309:b0:681:7711:6273 with SMTP id gc9-20020a056214230900b0068177116273mr1482771qvb.45.1705609288349; Thu, 18 Jan 2024 12:21:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705609288; cv=pass; d=google.com; s=arc-20160816; b=F7VOUlbeMcdYnP72w+T5V9Jhfvnq53xI8H9kNf8q0JbMlhQCid9J6D//ELXzljDfjJ e4FpWVK82+lGNPj486AimHYVMUlMrHzCqNUvuE53HmWht8lqFXdZ2cOkIsBqAwigkMlR ZpsmaMfmYue43ZY/bh47V015AsJFLs4GwxrjxHCzOHFEfEO4oD6q9+X2jUuSo/MI7y1R KV118BJGc2c6FkyAXmw2bLvoC52UZ+iS+EKDsvT1AZuNx4dNd2GeF0/H88ilZt1NdyIZ Ios9gn9UrhgOIw33aLmg9lJMiVCb8Zi7kDPNWHkx84VVzalRAX2xV1h9nmIafM4pVifI pjJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1OG1lQkxW6MHGxP8IYqG9fcxPOWLktFdBZC4G3nspmY=; fh=MPCpzeOAvFu/MOJgSNavW5YY6F0qx+lqXXt1qB/dbVI=; b=vFsC4l+Fgzv8k87ID+RBaBrOE8FY3/PdoLBA7WwAJj/KiSctZMH8AZSWIGe7OUKN04 JcGxaFuoE3m1AcullFV+jQIuB7ycWuKjVAyjDkrP2c/hZ6p567wrkmWYjqq6XoQ82BHB 2c5ytMuR4khNlmcEeLtKSBspAiiEw0hEQJasArn+V44cFeF/PW7spagbBLt7vgUBQENm WKON9cCYfbXhucSWFT7i+0Fy5Vc09jFG+63F5G8ddcEITZewnjcLCRLWPL61I8rMa3iI hXW6W+GTXRsW2dptJ4hPAZmGVUDdkZDgMPwCQglO9U/U9TPUPRcy5/CowPOwoTpYboUy WxZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CO2uE6Up; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g2-20020a0cf082000000b0067a90d3023esi14271697qvk.279.2024.01.18.12.21.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 12:21:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CO2uE6Up; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AAA201C22E4A for ; Thu, 18 Jan 2024 20:21:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 334F72E645; Thu, 18 Jan 2024 20:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CO2uE6Up" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 EE3F52E413 for ; Thu, 18 Jan 2024 20:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705609263; cv=none; b=dOBQb4jimrUnaPEyDLbkcwuoy01zFMgnFNkLSwPYIhJ2y9nyUMqT9Bv4qJljAjzcpMaEi5lUl2AzUfoSFEF733B/Wi7wUIv8l3WWq9xIJtUgzMJjSE4NhSQAZdXA0BJHZLzPfGRoNKM6p+SsWH2977fD6MvD38JmVXohgs2f5MY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705609263; c=relaxed/simple; bh=ylo497vrS9F+ETAy9ybQ2/eITqabfK68j7rK5FzECyw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oTw3rEeZU7YFqyTSPSBm7WAI+mK6LBA6pTyCDcgzLJjHt7Hh6RcHj9Zvaadb8d9ZKE7eqEm3sEik3YWs72btHmYJYLIvMTFRz4TNwNNwkgPGFP4fkPMJIvqF7mSAcIAwh/eClkiWy0uREQONErbKKZR4gHuxVOclg7qXElOaavY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CO2uE6Up; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40e9101b5f9so346575e9.3 for ; Thu, 18 Jan 2024 12:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705609260; x=1706214060; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1OG1lQkxW6MHGxP8IYqG9fcxPOWLktFdBZC4G3nspmY=; b=CO2uE6UpLqVCtBxaYyA84O8hNc5sm/iPx8GwcA3sdZZoflChNHcamWNtXTxElK0JxG xEInobzhYrnm1+vM2SVWM3/NGwY5w2pubLgSHbF484gv6T32rSOVpnpwtJFNPtD0qdBq JGQ3JTq5MIert5gLYcGWNgpmFrxso3BZ8FnM5QACB76api7vSk4aSnLN7dmaz1jYG7C/ At+ry+bVZvxgCETqJ/+Lwn8wFINVrP3QXC4Yly6w6fLmvLUijrOfgKC07EjalCMAUhgc WorrvO3SIj7ABZ9zaUMAuifjpm3d9bec9UB5lWo6vvxymZAyReUmuQhLSpuOAtr5x93f VsNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705609260; x=1706214060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1OG1lQkxW6MHGxP8IYqG9fcxPOWLktFdBZC4G3nspmY=; b=cyE11W61WaOKCkwPb16g0eZRXAncioYRPpEXZo/UcXUjFTZn6ANGlwrQc95wNf74W+ Axpqvq8XUbWW9GetkJae4flDfxKLxkEJc3qiTjXvD/Z8wUpAEGx6xMVImT93DBH9C7x+ /xF/NTt8occQEkS9NCcGQD0QiQcOlohgEnjyhsbfUA52celj8vBuFJZGRQf+UDga5SSD Wn5r/iVBv1ooOxpFqBgj30xxsoXyT7nEv5af55oF8PuIU3DoXPQNegAANzDoBaysR7ZI Io3Ni/DPiNvBydHd2hET9bUNdSLpTeNuulEgcAG53L2F1tNQEP7KrQAZGZDVny71E5Ib qbqg== X-Gm-Message-State: AOJu0YzaXRhOj9aHTHQ98HDs9lFusi6qmTjd35UYT2fKl+IZyegfHZAe h14wrJfaf7NVf0QWZKzAQqEMp0H8jE/4h5X31NQfp2RluUa9zR51 X-Received: by 2002:a05:600c:4f42:b0:40e:5a80:6177 with SMTP id m2-20020a05600c4f4200b0040e5a806177mr810142wmq.69.1705609259903; Thu, 18 Jan 2024 12:20:59 -0800 (PST) Received: from localhost.localdomain (host81-156-206-78.range81-156.btcentralplus.com. [81.156.206.78]) by smtp.gmail.com with ESMTPSA id bi15-20020a05600c3d8f00b0040e83eac47fsm9892872wmb.5.2024.01.18.12.20.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Jan 2024 12:20:59 -0800 (PST) From: Levi Yun To: james.morse@arm.com, pierre.gondois@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Levi Yun Subject: [PATCH v3] firmware/arm_sdei: Fix invalid argument to unregister private events. Date: Thu, 18 Jan 2024 20:20:54 +0000 Message-ID: <20240118202054.81795-1-ppbuk5246@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240118201514.81046-1-ppbuk5246@gmail.com> References: <20240118201514.81046-1-ppbuk5246@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Levi Yun Fixes: d2c48b2387eb ("firmware: arm_sdei: Fix sleep from invalid context BUG") Reviewed-by: James Morse --- Changes: v1->v2: add fixes tag and resetting sdei_hp_state v2->v3: add missing resetting sdei_hp_state. drivers/firmware/arm_sdei.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c index 285fe7ad490d..973972d50287 100644 --- a/drivers/firmware/arm_sdei.c +++ b/drivers/firmware/arm_sdei.c @@ -763,7 +763,9 @@ 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); + + sdei_hp_state = 0; err = sdei_unregister_shared(); if (err) -- 2.41.0