diff options
author | Vasu Dev <vasu.dev@intel.com> | 2011-10-28 14:34:12 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-31 05:26:44 -0400 |
commit | 14fc315fa30d128760c7edeff56530142576cd2e (patch) | |
tree | afedc80340cff48207180675f64b956fbc8940ff /drivers/scsi | |
parent | 044aceef33bba7a471a3ed47ac60998b2983b18b (diff) |
[SCSI] libfc: fix checking FC_TYPE_BLS
Its checked after skb freed, so instead have fh_type
cached and then check FC_TYPE_BLS against cached
fh_type value.
This wrong check was causing double exch locking as
reported by Bhanu at
https://lists.open-fcoe.org/pipermail/devel/2011-October/011793.html
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 7c055fdca45d..81235f36adc1 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -469,6 +469,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, | |||
469 | struct fc_frame_header *fh = fc_frame_header_get(fp); | 469 | struct fc_frame_header *fh = fc_frame_header_get(fp); |
470 | int error; | 470 | int error; |
471 | u32 f_ctl; | 471 | u32 f_ctl; |
472 | u8 fh_type = fh->fh_type; | ||
472 | 473 | ||
473 | ep = fc_seq_exch(sp); | 474 | ep = fc_seq_exch(sp); |
474 | WARN_ON((ep->esb_stat & ESB_ST_SEQ_INIT) != ESB_ST_SEQ_INIT); | 475 | WARN_ON((ep->esb_stat & ESB_ST_SEQ_INIT) != ESB_ST_SEQ_INIT); |
@@ -493,7 +494,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, | |||
493 | */ | 494 | */ |
494 | error = lport->tt.frame_send(lport, fp); | 495 | error = lport->tt.frame_send(lport, fp); |
495 | 496 | ||
496 | if (fh->fh_type == FC_TYPE_BLS) | 497 | if (fh_type == FC_TYPE_BLS) |
497 | return error; | 498 | return error; |
498 | 499 | ||
499 | /* | 500 | /* |