Re: [PATCH 09/14] scsi: mpt3sas: Remove in_interrupt().

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

 



On Thu, Nov 26, 2020 at 02:29:47PM +0100, Sebastian Andrzej Siewior wrote:
> From: "Ahmed S. Darwish" <a.darwish@xxxxxxxxxxxxx>
> 
> _scsih_fw_event_cleanup_queue() waits for all outstanding firmware
> events wokrqueue handlers to finish. If in_interrupt() is true, it
> cancels itself and return early.
> 
> That in_interrupt() check is ill-defined and does not provide what the
> name suggests: it does not cover all states in which it is safe to block
> and call functions like cancel_work_sync().
> 
> That check is also not needed: _scsih_fw_event_cleanup_queue() is always
> invoked from process context. Below is an analysis of its callers:
> 
>   - scsih_remove(), bound to PCI ->remove(), process context
> 
>   - scsih_shutdown(), bound to PCI ->shutdown(), process context
> 
>   - mpt3sas_scsih_clear_outstanding_scsi_tm_commands(), called by
>       => _base_clear_outstanding_commands(), called by
>         =>_base_fault_reset_work(), workqueue
>         => mpt3sas_base_hard_reset_handler(), locks mutex
> 
> Remove the in_interrupt() check. Change _scsih_fw_event_cleanup_queue()
> specification to a purely process-context function and mark it with
> "Context: task, can sleep".
> 
> Signed-off-by: Ahmed S. Darwish <a.darwish@xxxxxxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Cc: Sathya Prakash <sathya.prakash@xxxxxxxxxxxx>
> Cc: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx>
> Cc: Suganath Prabu Subramani <suganath-prabu.subramani@xxxxxxxxxxxx>
> Cc: <MPT-FusionLinux.pdl@xxxxxxxxxxxx>

Reviewed-by: Daniel Wagner <dwagner@xxxxxxx>



[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