lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0EA5B226BC5C7B45A71BF612AA8A019E01947C68AA@AVMB1.qlogic.org>
Date:	Mon, 13 Jul 2015 18:44:03 +0000
From:	Sony Chacko <sony.chacko@...gic.com>
To:	nick <xerofoify@...il.com>
CC:	Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@...gic.com>,
	netdev <netdev@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"Nilesh Javali" <nilesh.javali@...gic.com>
Subject: RE: [PATCH] bnx2:Make various functions to have a return type of
 void in the file bnx2.c

> 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@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ