From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-190b.mail.infomaniak.ch (smtp-190b.mail.infomaniak.ch [185.125.25.11]) (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 45ED721D3CD for ; Mon, 15 Dec 2025 16:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.25.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765817113; cv=none; b=Y3QwuARTrvjguTRcMvQlgejXrRavytBdrHAOoMPVslQHPZDhbU+W+vVerol2rKGljDB1yaRLE+rsHvU9HBL1jpGO/r6tB7snQFpStrTcq9spz9x9jszGKGnwW9ifozvtjDa7+a2r8bhl35x1AXg5vKAIeotoLS2Dk6dnkPxOxMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765817113; c=relaxed/simple; bh=aCcOgMK6m3bJ6wWFFEg3ONUHuPWUvNETNYKfKJwmgbw=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=IT+ryN/g8f+PgsuHp2OYtgtXpKEwqCnFT0p9ZLkVyQA3FSfi4/B5UCfUBOMu7YTW9x8AwI2ovS772syIp25+tssh+LXvQ6uwtssGFUGVOC1aG4hND1r3m9f4LsAfnlGH73Fas8oi9Y6s0OGFMWPn9g39CFdFKd567W3bfHNObxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=185.125.25.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-4-0000.mail.infomaniak.ch (unknown [IPv6:2001:1600:7:10::a6b]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4dVQgP6vGkz7BQ; Mon, 15 Dec 2025 17:36:33 +0100 (CET) Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4dVQgM0sMnzD5S; Mon, 15 Dec 2025 17:36:31 +0100 (CET) From: Quentin Schulz Subject: [PATCH 0/2] accel/rocket: fix unwinding in error paths of two functions Date: Mon, 15 Dec 2025 17:36:13 +0100 Message-Id: <20251215-rocket-error-path-v1-0-eec3bf29dc3b@cherry.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x3MTQqAIBBA4avErBtI0/6uEi3EphqCjFEiiO6et PwW7z0QSZgiDMUDQhdHDkeGKgvwmztWQp6zQVfaKq00SvA7JSSRIHi6tOHSt53xpnG2qiF3p9D C9/8cp/f9ABGdXABjAAAA X-Change-ID: 20251212-rocket-error-path-f9784c46a503 To: Tomeu Vizoso , Oded Gabbay , Jeff Hugo Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Quentin Schulz , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Infomaniak-Routing: alpha As reported[1], in the current state of master (that is, *without* that[2] patch, yet unmerged), it is possible to trigger Oops/out-of-bounds errors/unbalanced runtime PM by simply compiling DRM_ACCEL_ROCKET built-in (=y) instead of as a module (=m). This fixes points 1 and 2 reported here[1] by fixing the unwinding in two functions to properly undo everything done in the same function prior to the error. Note that this doesn't mean the Rocket device is usable if one core is missing. In fact, it seems it doesn't as I'm hit with many rocket fdac0000.npu: NPU job timed out followed by one rocket fdad0000.npu: NPU job timed out (and that, five times) whenever core0 (fdab0000.npu) fails to probe and I'm running the example from https://docs.mesa3d.org/teflon.html#do-some-inference-with-mobilenetv1 so something else probably needs some additional love. [1] https://lore.kernel.org/linux-rockchip/0b20d760-ad4f-41c0-b733-39db10d6cc41@cherry.de/ [2] https://lore.kernel.org/linux-rockchip/20251205064739.20270-1-rmxpzlb@gmail.com/ Signed-off-by: Quentin Schulz --- Quentin Schulz (2): accel/rocket: fix unwinding in error path in rocket_core_init accel/rocket: fix unwinding in error path in rocket_probe drivers/accel/rocket/rocket_core.c | 7 +++++-- drivers/accel/rocket/rocket_drv.c | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) --- base-commit: a619746d25c8adafe294777cc98c47a09759b3ed change-id: 20251212-rocket-error-path-f9784c46a503 Best regards, -- Quentin Schulz