diff options
author | Yi Zou <yi.zou@intel.com> | 2012-07-06 13:40:26 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-07-20 03:58:56 -0400 |
commit | db95fc004ea50f661a98c9f25585c0a734b5c238 (patch) | |
tree | a067a9c856130f035f3fff0de932e2dc66d25eaa /drivers/scsi | |
parent | 95fdd5e980e6eea4579c15043f7a9be6ad63012c (diff) |
[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 <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 3 |
1 files changed, 2 insertions, 1 deletions
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: | |||
980 | rcu_read_unlock(); | 980 | rcu_read_unlock(); |
981 | FC_LPORT_DBG(lport, "dropping unexpected frame type %x\n", fh->fh_type); | 981 | FC_LPORT_DBG(lport, "dropping unexpected frame type %x\n", fh->fh_type); |
982 | fc_frame_free(fp); | 982 | fc_frame_free(fp); |
983 | lport->tt.exch_done(sp); | 983 | if (sp) |
984 | lport->tt.exch_done(sp); | ||
984 | } | 985 | } |
985 | 986 | ||
986 | /** | 987 | /** |