Message ID | 20211109092758.1289582-1-juergh@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,U/raspi] UBUNTU: firmware: raspberrypi: Partially revert 'firmware: bcm2835: Support ARCH_BCM270x' | expand |
Not U, will resend. ...Juerg > BugLink: https://bugs.launchpad.net/bugs/1950117 > > The upstream commit 09cbd1df7d26 ("firmware: raspberrypi: Fix a leak in > 'rpi_firmware_get()'") releases a reference which was never taken in > our kernel due to a downstream raspberrypi commit. This leads to a kernel > crash but apparently only on Pi 3 and 2. Fix that by reverting part of > the downstream commit which also happend recently in the downstream kernel > but silently during a merge... > > Signed-off-by: Juerg Haefliger <juergh@canonical.com> > --- > drivers/firmware/raspberrypi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c > index 7b554d33c18c..b277af60ac1f 100644 > --- a/drivers/firmware/raspberrypi.c > +++ b/drivers/firmware/raspberrypi.c > @@ -438,7 +438,7 @@ static int rpi_firmware_remove(struct platform_device *pdev) > */ > struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) > { > - struct platform_device *pdev = g_pdev; > + struct platform_device *pdev = of_find_device_by_node(firmware_node); > struct rpi_firmware *fw; > > if (!pdev)
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index 7b554d33c18c..b277af60ac1f 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -438,7 +438,7 @@ static int rpi_firmware_remove(struct platform_device *pdev) */ struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) { - struct platform_device *pdev = g_pdev; + struct platform_device *pdev = of_find_device_by_node(firmware_node); struct rpi_firmware *fw; if (!pdev)
BugLink: https://bugs.launchpad.net/bugs/1950117 The upstream commit 09cbd1df7d26 ("firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()'") releases a reference which was never taken in our kernel due to a downstream raspberrypi commit. This leads to a kernel crash but apparently only on Pi 3 and 2. Fix that by reverting part of the downstream commit which also happend recently in the downstream kernel but silently during a merge... Signed-off-by: Juerg Haefliger <juergh@canonical.com> --- drivers/firmware/raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)