Re: [PATCH 7/9] lpfc: Fix infinite wait when driver unregisters a remote NVME port.

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

 



On 12/09/2017 02:18 AM, James Smart wrote:
> When unregistering a remote port the lpfc driver would eventually
> wait for the remoteport_unreg done callback. But the driver never
> completed the io aborts that would allow the connections to terminate
> thus the unreg done callback was never issued.  Turns out the coding
> style of the driver allowed for the wait to occur on the same cpu
> that the deferred isr is called on. The blocking for the wait, blocked
> the isr, and as the isr didn't run, the io aborts wouldn't finish.
> 
> Turns out there was never a good reason to block waiting for the
> unreg done in the first place. The driver can continue execution and
> the ref counting within the driver will do the right thing.
> 
> Resolve by removing the wait and patching up a few cases where the
> ref counting didn't look right - mainly cases where the remote port
> comes back before the aborts had completed and the unreg done had
> been called. Additionally, a few places which used pointer values
> to guide driver actions weren't protected by lock, so correct those.
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>
> Signed-off-by: James Smart <james.smart@xxxxxxxxxxxx>
> ---
>  drivers/scsi/lpfc/lpfc_nvme.c | 135 ++++++++++++++++--------------------------
>  1 file changed, 51 insertions(+), 84 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[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