From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795968558; b=Hmcqr0x1diIzVGSIL0B2o6IFu0GyGjSka56mlfh5totnm/5NLNwE5w/Uthp2jAxXGUpY GmDkxYdWrHO4QZWNS1EhCJAbVxgfR+y1Zntuc9FEVdP+7OwgJTALO06dVbDRMfk5Cjzw5 Lwjc1dJzswVVb54y6+2Ha2nHtJ1KfKxmhzdl3+eLi9AO6J0mM4PjrbTMXSoq3dRyjlAGH Fa5kMk+XGVqMbp/86a3AETZg7o79gw6rEOPm9yEAeiDRMLnYWotamOAnwX8rjQg5onaQG 1RWWar0Ffy/nhCFqabJt4DHbA58mddLVO9ARx0PSk0Oqhc8/uB3/M4cTvKqFWI06wUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795968558; h=Received:DKIM-Signature:Received:Received:X-ME-Sender: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer: MIME-Version:X-ThreadId:Date:From:To:Cc:Message-Id:In-Reply-To: References:Subject:Content-Type:Content-Transfer-Encoding; bh=4CjchIWblhQvCkTZyhzZEeNttBIh9gI5unI819s98CA=; b=tzxzjBXU8UDScjJfjAGOZvE/exncyOd432g1HDQ0qpzN09bNIWd8JIkLAvcyyDyTJ69m IyyutpmqYClAOBxuhmeWkBWf0O2xEzBj1VyTPr5upDW4CXowyq/BlNS7rbnnxyg+hod15 v8sM2SdGC5wE261vSE6blZud+pv5IANZ5HklQ9KS/5pXm/H1pVHAR8Dubi3yQDYRDjONj eYS4ugg11otSAoLrEo9HMB6OBZ/n8hSDXZmIUe7CQM2yonZ3DakJCg6eiPl851GHsLXLX iL6EKGMoMAU7vmII6uWoWicBfaYy1+MSOs2M7337yxUykarbBJrStUp2HKDyZz/IDDg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=dhXkRXiq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995E1606A325 for ; Sun, 29 Nov 2026 16:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=dhXkRXiq Received: by smtp.kernel.org (Postfix) with ESMTPSA id B65B41F00897; Sun, 29 Nov 2026 16:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795968558; bh=4CjchIWblhQvCkTZyhzZEeNttBIh9gI5unI819s98CA=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=dhXkRXiqLk8DWd5YQsQD36C31uL2YroVtonnV7JiTmlMh37t5sD8QC6jtNDzTnj3g Xz5PR/ze2lFq8bn+wXF0J8GmLfj2Pv0/tGrHFc+pctBsMg3J/a6OpPIi/5alMPapdb 33YjttdeAofDII0KzFZoiXeP+tZryswBiOBwY0AnQAilZ1Znea7kWeXY7ZE/luX1pJ vb7ndtjQjCtz+FI/+BdINDeiwo8x6BKbqEadzDi6Hwq3+rkK6I8tTw+WzhkrTET2yr +NezXrtfz5sQnaClqI0MTkL3hkkUqAolLsJT8+XMhsZhl2VfH7NRcXQrm5McXII7tL ft0lg6UGx1IkQ== Received: from ams-compute-01.internal (ams-compute-01.internal [10.64.2.61]) by mailfauth.ams.internal (Postfix) with ESMTP id F06F4198003A; Sun, 29 Nov 2026 11:09:15 -0500 (EST) Received: from ams-imap-19 ([10.64.2.39]) by ams-compute-01.internal (MEProxy); Sun, 29 Nov 2026 11:09:15 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTE5CyDgRW6Dz5SH0z/05tnfLLsmFJhoyBJ04rf3hIQL2FbNMizbcTqzrd1Jmaf3yd yRGCP6DhJ934ORsBVCz8o+Fds9JatTm9toUZR6QIZ061l8dgT2Jr+WtuHhFc8SE3/FL0mZ rDje+SIfhaOMwOoIifD1QTfBzc6rXhtg4ZVnJi3gVp0Di9M2mGrN5Sc75Xm6VlqUNom7+n xbMGSEVOeSSIByfI+8N9HPp5AR+3613yukG/uASUpdgEi7WKjUoXtt6YjSJc24WGLR1eco H73C0a8EmnijG9VaAKZdFi/4sClHuvKcO91uOQ469PNlqgCJNHgqWA97k77SaCDwIrC3Bl JA/QbYAXwK5LpnsrBxBmn037ttDUjQ3blDSao81fDMaqdBbeJVKVW4icqhYyisvWzAqznp E38ljBIFIFbPT7DFBF1i6F29Z0BRsbW770jpbiMJG1UJFT6Edto4IxzNhuNvPX2zNzMGxb 6WrxvM1CsRs/hRnfb2TWBPfcYv88CUJd7kOPh6n6FgoybkRZq4XLoXPKMuChuSmeeP+IFy WX6JKNT7KC5rQruTex1HWKjyziEFR21W007wl65DD9JizFY72QyOUHcxfgH0Jz6qJTF8uR sn6bEFvIDKAcgveaKUwL5txazMjHTFpJVmirpiH/uB3q+AYlmOxgXrTsRQzw X-ME-Proxy: Feedback-ID: ia3204a8f:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id 63C332F8005A; Sun, 29 Nov 2026 11:09:14 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-ThreadId: ARiHGUpj-soV Date: Sun, 29 Nov 2026 17:08:44 +0100 From: "Imre Kaloz" To: "Lee Jones" , "Joshua Kinard" , "Alexandre Belloni" , "Matthias Fuchs" , "Andrew Morton" , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Message-Id: In-Reply-To: <20261123200012.502284-9-lee@kernel.org> References: <20261123200012.502284-1-lee@kernel.org> <20261123200012.502284-9-lee@kernel.org> Subject: Re: [PATCH 08/10] rtc: ds1685: check driver data for NULL in ds1685_rtc_poweroff() Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Lee, On Mon, Nov 23, 2026, at 20:59, Lee Jones wrote: > ip32_poweroff() invokes ds1685_rtc_poweroff() with the static > ip32_rtc_device platform device. If ds1685_rtc_probe() previously > failed or the device was unbound, platform_get_drvdata() returns NULL > even though pdev is non-NULL, causing a NULL pointer dereference at > rtc->irq_num instead of entering the intended fallback spin loop. > > Verify that platform_get_drvdata() is non-NULL alongside pdev before > dereferencing rtc. > > Fixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks") > Closes: https://sashiko.dev/#/bug/linux-0a1838c9-65d2-4d1c-bc21-35a6a2582144 > Cc: stable@vger.kernel.org > Signed-off-by: Lee Jones Tested on an SGI O2 (RM5200). With rtc-ds1685 unbound, poweroff -f without this patch faults in ds1685_rtc_poweroff() on address 0x1c; with it, the "spinning forever" message is printed instead. With the driver bound, power-off works as before. Tested-by: Imre Kaloz Thanks, Imre