public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance
@ 2010-03-16 15:23 Jiri Slaby
  2010-03-16 15:23 ` [PATCH 2/3] SCSI: lpfc, fix lock imbalances Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jiri Slaby @ 2010-03-16 15:23 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel, jirislaby, Jayamohan Kallickal

Stanse found that one error path in mgmt_invalidate_icds omits to unlock
ctrl->mbox_lock. Fix that.

Added in 756d29c8c7ed8887ed7d752371ce2f (Enable async mode for mcc rings)
where the spinlock was moved.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/be2iscsi/be_mgmt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 72617b6..e641922 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -169,6 +169,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
 		SE_DEBUG(DBG_LVL_1,
 			 "Failed to allocate memory for"
 			 "mgmt_invalidate_icds \n");
+		spin_unlock(&ctrl->mbox_lock);
 		return -1;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
-- 
1.7.0.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] SCSI: lpfc, fix lock imbalances
  2010-03-16 15:23 [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance Jiri Slaby
@ 2010-03-16 15:23 ` Jiri Slaby
  2010-03-16 17:11   ` James Smart
  2010-03-16 15:23 ` [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance Jiri Slaby
  2010-03-16 18:10 ` [PATCH 1/3] SCSI: be2iscsi, " Mike Christie
  2 siblings, 1 reply; 7+ messages in thread
From: Jiri Slaby @ 2010-03-16 15:23 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel, jirislaby, James Smart

Stanse found that two error paths in lpfc_bsg_rport_els_cmp and
lpfc_issue_ct_rsp_cmp omits to unlock phba->ct_ev_lock. It is
because they wrongly unlock phba->hbalock instead. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: James Smart <james.smart@emulex.com>
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/lpfc/lpfc_bsg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 692c29f..992efb1 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -432,7 +432,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba,
 	dd_data = cmdiocbq->context1;
 	/* normal completion and timeout crossed paths, already done */
 	if (!dd_data) {
-		spin_unlock_irqrestore(&phba->hbalock, flags);
+		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
 		return;
 	}
 
@@ -1195,7 +1195,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba,
 	dd_data = cmdiocbq->context1;
 	/* normal completion and timeout crossed paths, already done */
 	if (!dd_data) {
-		spin_unlock_irqrestore(&phba->hbalock, flags);
+		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
 		return;
 	}
 
-- 
1.7.0.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance
  2010-03-16 15:23 [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance Jiri Slaby
  2010-03-16 15:23 ` [PATCH 2/3] SCSI: lpfc, fix lock imbalances Jiri Slaby
@ 2010-03-16 15:23 ` Jiri Slaby
  2010-03-16 20:23   ` [Suspected SPAM] " Giridhar Malavali
  2010-03-16 18:10 ` [PATCH 1/3] SCSI: be2iscsi, " Mike Christie
  2 siblings, 1 reply; 7+ messages in thread
From: Jiri Slaby @ 2010-03-16 15:23 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel, jirislaby, Giridhar Malavali

Stanse found that one error path in qla24xx_bsg_timeout omits to
unlock ha->hardware_lock. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/qla2xxx/qla_attr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 90d1e06..a3591e5 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -2388,6 +2388,7 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
 	return 0;
 
 done:
+	spin_unlock_irqrestore(&ha->hardware_lock, flags);
 	if (bsg_job->request->msgcode == FC_BSG_HST_CT)
 		kfree(sp->fcport);
 	kfree(sp->ctx);
-- 
1.7.0.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] SCSI: lpfc, fix lock imbalances
  2010-03-16 15:23 ` [PATCH 2/3] SCSI: lpfc, fix lock imbalances Jiri Slaby
@ 2010-03-16 17:11   ` James Smart
  0 siblings, 0 replies; 7+ messages in thread
From: James Smart @ 2010-03-16 17:11 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: James.Bottomley@suse.de, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, jirislaby@gmail.com

Acked-By:  James Smart <james.smart@emulex.com>

-- james s


Jiri Slaby wrote:
> Stanse found that two error paths in lpfc_bsg_rport_els_cmp and
> lpfc_issue_ct_rsp_cmp omits to unlock phba->ct_ev_lock. It is
> because they wrongly unlock phba->hbalock instead. Fix that.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: James Smart <james.smart@emulex.com>
> Cc: James Bottomley <James.Bottomley@suse.de>
> ---
>  drivers/scsi/lpfc/lpfc_bsg.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index 692c29f..992efb1 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -432,7 +432,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba,
>  	dd_data = cmdiocbq->context1;
>  	/* normal completion and timeout crossed paths, already done */
>  	if (!dd_data) {
> -		spin_unlock_irqrestore(&phba->hbalock, flags);
> +		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
>  		return;
>  	}
>  
> @@ -1195,7 +1195,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba,
>  	dd_data = cmdiocbq->context1;
>  	/* normal completion and timeout crossed paths, already done */
>  	if (!dd_data) {
> -		spin_unlock_irqrestore(&phba->hbalock, flags);
> +		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
>  		return;
>  	}
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance
  2010-03-16 15:23 [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance Jiri Slaby
  2010-03-16 15:23 ` [PATCH 2/3] SCSI: lpfc, fix lock imbalances Jiri Slaby
  2010-03-16 15:23 ` [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance Jiri Slaby
@ 2010-03-16 18:10 ` Mike Christie
  2 siblings, 0 replies; 7+ messages in thread
From: Mike Christie @ 2010-03-16 18:10 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: James.Bottomley, linux-scsi, linux-kernel, jirislaby,
	Jayamohan Kallickal

On 03/16/2010 10:23 AM, Jiri Slaby wrote:
> Stanse found that one error path in mgmt_invalidate_icds omits to unlock
> ctrl->mbox_lock. Fix that.
>
> Added in 756d29c8c7ed8887ed7d752371ce2f (Enable async mode for mcc rings)
> where the spinlock was moved.
>
> Signed-off-by: Jiri Slaby<jslaby@suse.cz>
> Cc: Jayamohan Kallickal<jayamohank@serverengines.com>
> Cc: James Bottomley<James.Bottomley@suse.de>
> ---
>   drivers/scsi/be2iscsi/be_mgmt.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
> index 72617b6..e641922 100644
> --- a/drivers/scsi/be2iscsi/be_mgmt.c
> +++ b/drivers/scsi/be2iscsi/be_mgmt.c
> @@ -169,6 +169,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
>   		SE_DEBUG(DBG_LVL_1,
>   			 "Failed to allocate memory for"
>   			 "mgmt_invalidate_icds \n");
> +		spin_unlock(&ctrl->mbox_lock);
>   		return -1;
>   	}
>   	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);

Looks good.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Suspected SPAM] [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance
  2010-03-16 15:23 ` [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance Jiri Slaby
@ 2010-03-16 20:23   ` Giridhar Malavali
  0 siblings, 0 replies; 7+ messages in thread
From: Giridhar Malavali @ 2010-03-16 20:23 UTC (permalink / raw)
  To: Jiri Slaby, James.Bottomley@suse.de
  Cc: LinuxSCSI, linux-kernel@vger.kernel.org, jirislaby@gmail.com




On 3/16/10 8:23 AM, "Jiri Slaby" <jslaby@suse.cz> wrote:

> Stanse found that one error path in qla24xx_bsg_timeout omits to
> unlock ha->hardware_lock. Fix that.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
> Cc: James Bottomley <James.Bottomley@suse.de>
> ---
>  drivers/scsi/qla2xxx/qla_attr.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index 90d1e06..a3591e5 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -2388,6 +2388,7 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
>         return 0;
> 
>  done:
> +       spin_unlock_irqrestore(&ha->hardware_lock, flags);
>         if (bsg_job->request->msgcode == FC_BSG_HST_CT)
>                 kfree(sp->fcport);
>         kfree(sp->ctx);
> --
> 1.7.0.1
> 
> 
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance
@ 2010-03-16 20:48 Jayamohan Kalickal
  0 siblings, 0 replies; 7+ messages in thread
From: Jayamohan Kalickal @ 2010-03-16 20:48 UTC (permalink / raw)
  To: Jiri Slaby, James.Bottomley; +Cc: linux-scsi, linux-kernel, jirislaby

Acked-By:  Jayamohan Kallickal <jayamohank@serverengines.com>

--
  _____  
From: Jiri Slaby [mailto:jslaby@suse.cz]
To: James.Bottomley@suse.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Jayamohan Kallickal [mailto:jayamohank@serverengines.com]
Sent: Tue, 16 Mar 2010 08:23:57 -0700
Subject: [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance

Stanse found that one error path in mgmt_invalidate_icds omits to unlock
ctrl->mbox_lock. Fix that.

Added in 756d29c8c7ed8887ed7d752371ce2f (Enable async mode for mcc rings)
where the spinlock was moved.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jayamohan Kallickal <jayamohank@serverengines.com>
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/be2iscsi/be_mgmt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 72617b6..e641922 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -169,6 +169,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
 		SE_DEBUG(DBG_LVL_1,
 			 "Failed to allocate memory for"
 			 "mgmt_invalidate_icds \n");
+		spin_unlock(&ctrl->mbox_lock);
 		return -1;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
-- 
1.7.0.1


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary information of
ServerEngines Corporation and is intended only for the designated recipient(s) named above. Any unauthorized
review, printing, retention, copying, disclosure or distribution is strictly prohibited.  If you are not the
intended recipient of this message, please immediately advise the sender by reply email message and
delete all copies of this message and any attachment(s). Thank you.


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-16 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 15:23 [PATCH 1/3] SCSI: be2iscsi, fix lock imbalance Jiri Slaby
2010-03-16 15:23 ` [PATCH 2/3] SCSI: lpfc, fix lock imbalances Jiri Slaby
2010-03-16 17:11   ` James Smart
2010-03-16 15:23 ` [PATCH 3/3] SCSI: qla2xxx, fix lock imbalance Jiri Slaby
2010-03-16 20:23   ` [Suspected SPAM] " Giridhar Malavali
2010-03-16 18:10 ` [PATCH 1/3] SCSI: be2iscsi, " Mike Christie
  -- strict thread matches above, loose matches on Subject: below --
2010-03-16 20:48 Jayamohan Kalickal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox