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

2020-12-03 Thread Nicolas Saenz Julienne
On Thu, 2020-12-03 at 09:05 +0100, Bartosz Golaszewski wrote: > On Mon, Nov 23, 2020 at 7:38 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 memo

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

2020-12-03 Thread Bartosz Golaszewski
On Mon, Nov 23, 2020 at 7:38 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 v5 01/11] firmware: raspberrypi: Keep count of all consumers

2020-12-02 Thread Florian Fainelli
On 11/23/2020 10:38 AM, 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_put() >

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

2020-11-23 Thread Nicolas Saenz Julienne
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_put() which will permit automatically decrease the reference count upon un