lkml.org 
[lkml]   [2015]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] bnx2:Make various functions to have a return type of void in the file bnx2.c
Date
> Sony,
> I also sent this patch and was wondering if I can get a reply on it.
> From 4a607447562bec161fd947caae5eb02c2365c58a Mon Sep
> 17 00:00:00 2001
> From: Nicholas Krause <xerofoify@gmail.com>
> Date: Wed, 8 Jul 2015 08:29:07 -0400
> Subject: [PATCH] bnx2i:Fix backwards locking scenario in the
> function bnx2i_cleanup_task
>
> This fixes the backwards locking scenario for unlocking the
> bottom half spinlock before calling the
> wait_for_completion_timeout on the structure pointer
> bnx2i_conn's member cmd_cleanup_cmpl for the critical region
> of this function to lock the spin_lock bottom half before
> unlocking it after the call to this function in order to have actual
> protection for the function bnx2i_cleanup_task's critical region.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/scsi/bnx2i/bnx2i_iscsi.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
> b/drivers/scsi/bnx2i/bnx2i_iscsi.c
> index 7289437..619a26f 100644
> --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
> @@ -1172,12 +1172,12 @@ static void
> bnx2i_cleanup_task(struct iscsi_task *task)
> if (task->state == ISCSI_TASK_ABRT_TMF) {
> bnx2i_send_cmd_cleanup_req(hba, task->dd_data);
>
> - spin_unlock_bh(&conn->session->back_lock);
> - spin_unlock_bh(&conn->session->frwd_lock);
> + spin_lock_bh(&conn->session->back_lock);
> + spin_lock_bh(&conn->session->frwd_lock);
> wait_for_completion_timeout(&bnx2i_conn-
> >cmd_cleanup_cmpl,
>
> msecs_to_jiffies(ISCSI_CMD_CLEANUP_TIMEOUT));
> - spin_lock_bh(&conn->session->frwd_lock);
> - spin_lock_bh(&conn->session->back_lock);
> + spin_unlock_bh(&conn->session->frwd_lock);
> + spin_unlock_bh(&conn->session->back_lock);
> }
> bnx2i_iscsi_unmap_sg_list(task->dd_data);
> }
> --
> 2.1.4
> I am assuming it's wrong but you never known.
> Nick

Nick,

I have included the Qlogic ISCSI engineer to the mailing list to
review and ACK the patch. I will also follow it up with the
ISCSI team.

Thanks,
Sony


\
 
 \ /
  Last update: 2015-07-13 21:01    [W:0.033 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site