Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2022665pxj; Sat, 22 May 2021 08:39:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxV1PU+DwsKb9IUP/GkzHOr5EQ/m1VEygjSXRGdn4ByhphdKBzy1kryRuTrBeLdYKDQ2AG X-Received: by 2002:a17:906:b1cc:: with SMTP id bv12mr14964451ejb.407.1621697956220; Sat, 22 May 2021 08:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621697956; cv=none; d=google.com; s=arc-20160816; b=knY6YByEgfGRqaVfARfdw9c+Vb0P5guwI/2PJHsmzt5jR8GjecP9ig03pNH7rGJjDK rmj6kbD4JZDetRiDU52gVm8DT7W6lChlXIcq3J9tC8m6IjuXpyqzMjQm6xlBsUxWvO5S lDrsCJ7UV1rI9MfiecQ8nR04tKb2ODqlJWXyaBOag3LVcJn5Fv47ys3KqQp3wlRxCLBi kQiXlQ4rub1O6i0GqdgW0BPMD4l5J6mTZKmLcASzZoKwZbTM2OVmjKv2HngA3kElApGo 3aY4AVpxH6HnCfQPO4quo8uooKRrH39vH8amT9cHG7HkvCWrDTTkr9NhWd2dc1RE+Xmx hfxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3FmcQE4Dq/n/wGkK4Ye6/2yPgzGGbndh+LExzDoxa0E=; b=AWS0pZ5ZfQ82zgTk5h2Oz0l9H9yjcQNuC+fxigSn35iksQ8jimzx6UY6BH3vyMMtdi ZVVEq2WbAlxpNavPjSS7XrUa5gc4K0egJQ2QrvivYMLBxCtj27WA4DirmSgsjXSRXi8s c9ZJ5l20h1QcgFce2TefTEtqowwmEereNoOlaheV9IbqgsH7ejqkG9FXNr+plZlrtjU5 3zLPz9hDwUlDk0CHytIF7nt9FRFfdh+U6IMNPCVIkW4OfFoLra4JI5wh2Ir5X3OJOt2U rRzsCGxmp6UweQSEAElh590udrUrU2dnA+HWzFnLa0Wypl3wlAn/VFWDG2KPTD/4CSh1 edvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si8134956eja.23.2021.05.22.08.38.27; Sat, 22 May 2021 08:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbhEVPiU (ORCPT + 99 others); Sat, 22 May 2021 11:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbhEVPiP (ORCPT ); Sat, 22 May 2021 11:38:15 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8A42C061574 for ; Sat, 22 May 2021 08:36:49 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkTgB-0002II-Aj; Sat, 22 May 2021 17:36:44 +0200 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:99ad:3825:19a7:30b2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id DCFFE6296AD; Sat, 22 May 2021 15:36:37 +0000 (UTC) Date: Sat, 22 May 2021 17:36:36 +0200 From: Marc Kleine-Budde To: Alexandre Belloni , Greg Kroah-Hartman Cc: Francois Gervais , linux-rtc@vger.kernel.org, Michael McCormick , Alessandro Zummo , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/1] rtc: pcf85063: fallback to parent of_node Message-ID: <20210522153636.ymyyq4vtzz2dq5k2@pengutronix.de> References: <20210310211026.27299-1-fgervais@distech-controls.com> <161861118020.865088.6364463756780633947.b4-ty@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pzbk4hzqlwyu5qjc" Content-Disposition: inline In-Reply-To: <161861118020.865088.6364463756780633947.b4-ty@bootlin.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pzbk4hzqlwyu5qjc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Greg, On 17.04.2021 00:16:40, Alexandre Belloni wrote: > On Wed, 10 Mar 2021 16:10:26 -0500, Francois Gervais wrote: > > The rtc device node is always or at the very least can possibly be NULL. > >=20 > > Since v5.12-rc1-dontuse/3c9ea42802a1fbf7ef29660ff8c6e526c58114f6 this > > will lead to a NULL pointer dereference. > >=20 > > To fix this we fallback to using the parent node which is the i2c client > > node as set by devm_rtc_allocate_device(). > >=20 > > [...] >=20 > Applied, thanks! >=20 > [1/1] rtc: pcf85063: fallback to parent of_node > commit: 03531606ef4cda25b629f500d1ffb6173b805c05 >=20 > I made the fallback unconditionnal because this should have been that way= from > the beginning as you point out. can you queue this for stable, as it causes a NULL Pointer deref with (at least) v5.12. Thanks, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --pzbk4hzqlwyu5qjc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmCpJQAACgkQqclaivrt 76k/iQf/QcxlRhflnlSiP8ESURfSgR8O5+8RvqZAMRJwn9Bl5DOCgwjmD+GjEaC0 HJGRgPs7k7K9sDq9UrwViBsvaaLK2FbSL9HcNjIdOB/NYOKj/XNv2PepyCq57vEZ dv829GdChEtxsqsJYwDbEDyAhXSF2B1GksCllxuEx+Wv79vYoOvlueVGbshJSYMS U5pZCDNV5CLNbb3I7pNEZDOIh6CshU1MYSHqgnQonVBMY8AM9Wamsl5ZIIHkUP1h ctLcXwpIwQK3fa3SB2dgXDxeipl24BXhfwMkUwxdFNV6YzzpXbNpbM+RmtvCfAaX /4kfTwMtRO5dCk4eT+uz+N+WFt6/4w== =3mQB -----END PGP SIGNATURE----- --pzbk4hzqlwyu5qjc--