Messages in this thread | | | From | "Winkler, Tomas" <> | Subject | RE: [char-misc-next V3] mei: add reference counting for me clients | Date | Tue, 4 Nov 2014 05:22:51 +0000 |
| |
> > On Mon, Nov 03, 2014 at 10:42:05AM +0200, Tomas Winkler wrote: > > To support dynamic addition/remove we add reference > > counter. > > What is keeping two different threads / cpus from grabbing a reference > at the same time the other one is dropping it? > > You have a list here, with no locking, right? You also don't have any > locking for your kref, which isn't good at all... > > Please audit and fix up.
Of course there is a lock, it wouldn't work at all. It is not explicit but we run under device_lock mutex.
Tomas
| |