Re: [PATCH v2] scsi: sr: get rid of sr global mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 18, 2020 at 09:20:28AM -0800, James Bottomley wrote:
> > > Replace the global mutex with per-sr-device mutex.
> > 
> > Do we actually need the lock at all?  What is protected by it?
> 
> We do at least for cdrom_open.  It modifies the cdi structure with no
> other protection and concurrent modification would at least screw up
> the use counter which is not atomic.  Same reasoning for cdrom_release.

Wouldn't the right fix to add locking to cdrom_open/release instead of
having an undocumented requirement for the callers?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux