Skip to content
  1. Jun 30, 2023
  2. Jun 20, 2023
  3. Jun 19, 2023
  4. Jun 18, 2023
    • Damien Le Moal's avatar
      ata: libata-scsi: Avoid deadlock on rescan after device resume · 6aa0365a
      Damien Le Moal authored
      
      
      When an ATA port is resumed from sleep, the port is reset and a power
      management request issued to libata EH to reset the port and rescanning
      the device(s) attached to the port. Device rescanning is done by
      scheduling an ata_scsi_dev_rescan() work, which will execute
      scsi_rescan_device().
      
      However, scsi_rescan_device() takes the generic device lock, which is
      also taken by dpm_resume() when the SCSI device is resumed as well. If
      a device rescan execution starts before the completion of the SCSI
      device resume, the rcu locking used to refresh the cached VPD pages of
      the device, combined with the generic device locking from
      scsi_rescan_device() and from dpm_resume() can cause a deadlock.
      
      Avoid this situation by changing struct ata_port scsi_rescan_task to be
      a delayed work instead of a simple work_struct. ata_scsi_dev_rescan() is
      modified to check if the SCSI device associated with the ATA device that
      must be rescanned is not suspended. If the SCSI device is still
      suspended, ata_scsi_dev_rescan() returns early and reschedule itself for
      execution after an arbitrary delay of 5ms.
      
      Reported-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Reported-by: default avatarJoe Breuer <linux-kernel@jmbreuer.net>
      Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217530
      Fixes: a19a93e4
      
       ("scsi: core: pm: Rely on the device driver core for async power management")
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Tested-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Tested-by: default avatarJoe Breuer <linux-kernel@jmbreuer.net>
      6aa0365a
    • Linus Torvalds's avatar
      Merge tag 'staging-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 1b29d271
      Linus Torvalds authored
      Pull staging driver fix from Greg KH:
       "Here is a single staging driver "fix" for 6.4-rc7. I've been sitting
        on it in my tree for many weeks as it is just a simple documentation
        update, with the hope that maybe some other staging driver fixes would
        need to be merged for 6.4-final, but that does not seem to be the
        case.
      
        So please, pull in this one documentation update so that Aaro doesn't
        get emails going forward that he can't do anything about"
      
      * tag 'staging-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: octeon: delete my name from TODO contact
      1b29d271