Re: [PATCH v6 01/11] firmware: raspberrypi: Keep count of all consumers

2020-12-16 Thread Bartosz Golaszewski
On Fri, Dec 11, 2020 at 5:48 PM Nicolas Saenz Julienne wrote: > > When unbinding the firmware device we need to make sure it has no > consumers left. Otherwise we'd leave them with a firmware handle > pointing at freed memory. > > Keep a reference count of all consumers and introduce rpi_firmware_

Re: [PATCH v6 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get()

2020-12-16 Thread Nicolas Saenz Julienne
On Wed, 2020-12-16 at 11:35 +0100, Bartosz Golaszewski wrote: > On Fri, Dec 11, 2020 at 5:48 PM Nicolas Saenz Julienne > wrote: > > > > It'll simplify the firmware handling for most consumers. > > > > Suggested-by: Bartosz Golaszewski > > Signed-off-by: Nicolas Saenz Julienne > > Reviewed-by:

Re: [PATCH v6 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get()

2020-12-16 Thread Bartosz Golaszewski
On Fri, Dec 11, 2020 at 5:48 PM Nicolas Saenz Julienne wrote: > > It'll simplify the firmware handling for most consumers. > > Suggested-by: Bartosz Golaszewski > Signed-off-by: Nicolas Saenz Julienne > Reviewed-by: Florian Fainelli > --- > > Changes since v4: > - Rearrange function calls for

Re: [PATCH] media: allegro: Fix use after free on error

2020-12-16 Thread Hans Verkuil
On 14/12/2020 18:16, Michael Tretter wrote: > On Mon, 14 Dec 2020 14:54:47 +0300, Dan Carpenter wrote: >> The "channel" is added to the "dev->channels" but then if >> v4l2_m2m_ctx_init() fails then we free "channel" but it's still on the >> list so it could lead to a use after free. Let's not add