提交 14fc315f 编写于 作者: V Vasu Dev 提交者: James Bottomley

[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.htmlSigned-off-by: NVasu Dev <vasu.dev@intel.com>
Tested-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: NYi Zou <yi.zou@intel.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 044aceef
...@@ -469,6 +469,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, ...@@ -469,6 +469,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp,
struct fc_frame_header *fh = fc_frame_header_get(fp); struct fc_frame_header *fh = fc_frame_header_get(fp);
int error; int error;
u32 f_ctl; u32 f_ctl;
u8 fh_type = fh->fh_type;
ep = fc_seq_exch(sp); ep = fc_seq_exch(sp);
WARN_ON((ep->esb_stat & ESB_ST_SEQ_INIT) != ESB_ST_SEQ_INIT); 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,7 +494,7 @@ static int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp,
*/ */
error = lport->tt.frame_send(lport, fp); error = lport->tt.frame_send(lport, fp);
if (fh->fh_type == FC_TYPE_BLS) if (fh_type == FC_TYPE_BLS)
return error; return error;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册