Re: [PATCH 4/5] staging: vc04_services: use kref + RCU to reference count services

2020-02-12 Thread Greg KH
On Wed, Feb 12, 2020 at 01:43:32PM -0500, Marcelo Diop-Gonzalez wrote: > Currently reference counts are implemented by locking service_spinlock > and then incrementing the service's ->ref_count field, calling > kfree() when the last reference has been dropped. But at the same > time, there's code

[PATCH 4/5] staging: vc04_services: use kref + RCU to reference count services

2020-02-12 Thread Marcelo Diop-Gonzalez
Currently reference counts are implemented by locking service_spinlock and then incrementing the service's ->ref_count field, calling kfree() when the last reference has been dropped. But at the same time, there's code in multiple places that dereferences pointers to services without having a