From: Yi Zou Date: Fri, 6 Jul 2012 17:40:26 +0000 (-0700) Subject: [SCSI] libfc: don't exch_done() on invalid sequence ptr X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=db95fc004ea50f661a98c9f25585c0a734b5c238;p=deliverable%2Flinux.git [SCSI] libfc: don't exch_done() on invalid sequence ptr The lport_recv(), i.e., fc_lport_recv_req() may get called w/o the sequence ptr being set in fr_seq(), particularly in the case of vn2vn mode, this may happen if the passive fcp provider, e.g., tcm_fc, has not been registered yet. Signed-off-by: Yi Zou Tested-by: Ross Brattain Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index ca278d4b0f66..d385d1147889 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -980,7 +980,8 @@ drop: rcu_read_unlock(); FC_LPORT_DBG(lport, "dropping unexpected frame type %x\n", fh->fh_type); fc_frame_free(fp); - lport->tt.exch_done(sp); + if (sp) + lport->tt.exch_done(sp); } /**