Message ID | 20211109093037.1349515-1-juergh@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,I/raspi] UBUNTU: firmware: raspberrypi: Partially revert 'firmware: bcm2835: Support ARCH_BCM270x' | expand |
On 09.11.21 10:30, Juerg Haefliger wrote: > 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> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- Would that not be "UBUNTU: SAUCE:"? Can be adjusted when committing. -Stefan > 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) >
On 09.11.21 10:30, Juerg Haefliger wrote: > 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> LGTM. Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Thanks > --- > 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) >
Late after it's been released already to have it on the record. Applied to I/raspi master-next branch. ...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(-)