Convert sd to kref and fix sd_open/sd_remove race
We actually fix this race by mediating the object release/get race (i.e. we destroy the scsi_disk object when its reference count goes 1->0, we use a semaphore to prevent something else trying to get a reference after or during this). The open/remove race is actually irrelevant because even if we open an already removed object, all that will happen is that we get a reference to a device that always returns EIO.
Showing
Please register or sign in to comment