On Fri, Sep 30, 2016 at 09:04:10AM +0200, Hannes Reinecke wrote:
> From: Chad Dupuis <[email protected]>
> 
> When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is
> already held which can lead to a deadlock condition like the following stack 
> trace:
> 
> [<ffffffffa04d8f18>] fc_rport_plogi_resp+0x28/0x200 [libfc]
> [<ffffffffa04cfa1a>] fc_invoke_resp+0x6a/0xe0 [libfc]
> [<ffffffffa04d0c08>] fc_exch_mgr_reset+0x1b8/0x280 [libfc]
> [<ffffffffa04d87b3>] fc_rport_logoff+0x43/0xd0 [libfc]
> [<ffffffffa04ce73d>] fc_disc_stop+0x6d/0xf0 [libfc]
> [<ffffffffa04ce7ce>] fc_disc_stop_final+0xe/0x20 [libfc]
> [<ffffffffa04d55f7>] fc_fabric_logoff+0x17/0x70 [libfc]
> 
> The other ELS handlers need to follow the FLOGI response handler and simply do
> a kref_put against the fc_rport_priv struct and exit when receving a
> -FC_EX_CLOSED response.
> 
> Signed-off-by: Chad Dupuis <[email protected]>
> ---
>  drivers/scsi/libfc/fc_rport.c | 32 ++++++++++++++++++++++++--------
>  1 file changed, 24 insertions(+), 8 deletions(-)

Acked-by: Johannes Thumshirn <[email protected]>

-- 
Johannes Thumshirn                                          Storage
[email protected]                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to