Skip to content

Commit

Permalink
[SCSI] libfc: don't exch_done() on invalid sequence ptr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Ross Brattain <[email protected]>
Signed-off-by: Robert Love <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
yizou authored and James Bottomley committed Jul 20, 2012
1 parent 95fdd5e commit db95fc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,8 @@ static void fc_lport_recv_req(struct fc_lport *lport,
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);
}

/**
Expand Down

0 comments on commit db95fc0

Please sign in to comment.