Re: [PATCH] libata: fix SCSI/ATA device association during hotplug

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

 



Tejun Heo wrote:
Two subtle hotplug related bugs are found.

* SCSI didn't use to issue commands to devices in SDEV_CANCEL state
  but now it does.  For ATA devices, it means that SYNCHRONIZE_CACHE
  is issued even after libata tells SCSI midlayer that the SCSI device
  is offline now.  When devices are swapped, SYNCHRONIZE_CACHE for the
  previous device can be issued to the later device.

* Devices can be swapped while SCSI probing is in progress.  SCSI
  device used to get associated with ATA device only after probing is
  complete, which means that SCSI device detaching is not performed
  while probing.  This can result in mismatch between SCSI device and
  ATA device (e.g. sd attached to ATAPI device) if devices are
  swapped after INQUIRY but before probing is complete.

This patch makes libata associate new SCSI device with ATA device
before INQUIRY is issued and check whether SCSI device issuing a
command matches dev->sdev on each command.  Both bugs are fixed by
this tighter coupling between SCSI device and ATA device.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

ACK


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux