Re: [PATCH 1/1] rtc: pcf85063: fallback to parent of_node

From
Marc Kleine-Budde <mkl@pengutronix.de>
Date
2021-05-22 15:36:58
Also in
lkml, stable
Reply to
Alexandre Belloni, 2021-04-16
Hello Greg,

On 17.04.2021 00:16:40, Alexandre Belloni wrote:
On Wed, 10 Mar 2021 16:10:26 -0500, Francois Gervais wrote:
quoted
The rtc device node is always or at the very least can possibly be NULL.

Since v5.12-rc1-dontuse/3c9ea42802a1fbf7ef29660ff8c6e526c58114f6 this
will lead to a NULL pointer dereference.

To fix this we fallback to using the parent node which is the i2c client
node as set by devm_rtc_allocate_device().

[...]
Applied, thanks!

[1/1] rtc: pcf85063: fallback to parent of_node
      commit: 03531606ef4cda25b629f500d1ffb6173b805c05

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

-- 
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 |

Attachments

Thread (6 messages) 6 messages, 4 authors, last reply 2021-05-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help