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

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

2020-12-12 Thread Stephen Boyd
Quoting Nicolas Saenz Julienne (2020-12-11 08:47:50) > 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 v6 01/11] firmware: raspberrypi: Keep count of all consumers

2020-12-11 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