Re: [PATCH V3 23/25] smartpqi: correct system hangs when resuming from hibernation

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

 



On Thu, 2020-12-10 at 14:36 -0600, Don Brace wrote:
> From: Kevin Barnett <kevin.barnett@xxxxxxxxxxxxx>
> 
> * Correct system hangs when resuming from hibernation after
>   first successful hibernation/resume cycle.
>   * Rare condition involving OFA.
> 
> Reviewed-by: Scott Benesh <scott.benesh@xxxxxxxxxxxxx>
> Signed-off-by: Kevin Barnett <kevin.barnett@xxxxxxxxxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxxxxxxx>
> ---
>  drivers/scsi/smartpqi/smartpqi_init.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c
> b/drivers/scsi/smartpqi/smartpqi_init.c
> index 40ae82470d8c..5ca265babaa2 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -8688,6 +8688,11 @@ static __maybe_unused int pqi_resume(struct
> pci_dev *pci_dev)
>         pci_set_power_state(pci_dev, PCI_D0);
>         pci_restore_state(pci_dev);
>  
> +       pqi_ctrl_unblock_device_reset(ctrl_info);
> +       pqi_ctrl_unblock_requests(ctrl_info);
> +       pqi_scsi_unblock_requests(ctrl_info);
> +       pqi_ctrl_unblock_scan(ctrl_info);
> +
>         return pqi_ctrl_init_resume(ctrl_info);
>  }

Like I said in my comments on 14/25:

pqi_ctrl_unblock_scan() and pqi_ctrl_unblock_device_reset() expand
to mutex_unlock(). Unlocking an already-unlocked mutex is wrong, and
a mutex has to be unlocked by the task that owns the lock. How
can you be sure that these conditions are met here?

Regards
Martin







[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