Re: [PATCH v3] scsi: libsas: add lun number check in .slave_alloc callback

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

 



On 22/06/2021 04:40, Yufen Yu wrote:
We found that offline a sata device on hisi sas control and then

/s/sata/SATA/

/s/control/controller/

scanning the host can probe 255 not-existant devices into system.

[root@localhost ~]# lsscsi
   [2:0:0:0]    disk    ATA      Samsung SSD 860  2B6Q  /dev/sda
   [2:0:1:0]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdb
   [2:0:2:0]    disk    SEAGATE  ST600MM0006      B001  /dev/sdc

  1) echo "offline" > /sys/block/sdb/device/state
  2) echo "- - -" > /sys/class/scsi_host/host2/scan

Then, we can see another 255 non-existant devices in system:
   [root@localhost ~]# lsscsi
   [2:0:0:0]    disk    ATA      Samsung SSD 860  2B6Q  /dev/sda
   [2:0:1:0]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdb
   [2:0:1:1]    disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdh
   ...
   [2:0:1:255]  disk    ATA      WDC WD2003FYYS-3 1D01  /dev/sdjb

After REPORT LUN command issued to the offline device fail, it tries
to do a sequential scan and probe all devices whose lun is not 0
successfully.

To fix the problem, we try to do same things as commit 2fc62e2ac350
("[SCSI] libsas: disable scanning lun > 0 on ata devices"), which
will prevent the device whose lun number is not zero probe into system.


I thought that we would mention why we don't change aic7xxx driver.

Reported-by: Wu Bo<wubo40@xxxxxxxxxx>
Suggested-by: John Garry<john.garry@xxxxxxxxxx>
Signed-off-by: Yufen Yu<yuyufen@xxxxxxxxxx>
---

Apart from the small items above:
Reviewed-by: John Garry <john.garry@xxxxxxxxxx>



[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