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>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 16 Jan 2012 18:30:01 -0800
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	target-devel@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, Andy Grover <agrover@...hat.com>,
	Dan Carpenter <error27@...il.com>,
	Roland Dreier <roland@...nel.org>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] target, iscsi: Fix up a few assignments

On Sun, 2012-01-15 at 19:33 +0100, Jesper Juhl wrote:
> A statement such as
>   struct iscsi_node_attrib *na = na = iscsit_tpg_get_node_attrib(sess);
> has undefined behaviour since there are two assignments to 'na', strictly 
> speaking (the order in which side-effects from the assignments take place 
> is undefined since there's no intervening sequence point), and it looks 
> unintentional in any case.
> 
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
> ---
>  drivers/target/iscsi/iscsi_target_erl1.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
>  compile tested only.
> 
> diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
> index 101b1be..af18cb8 100644
> --- a/drivers/target/iscsi/iscsi_target_erl1.c
> +++ b/drivers/target/iscsi/iscsi_target_erl1.c
> @@ -1238,7 +1238,7 @@ void iscsit_mod_dataout_timer(struct iscsi_cmd *cmd)
>  {
>  	struct iscsi_conn *conn = cmd->conn;
>  	struct iscsi_session *sess = conn->sess;
> -	struct iscsi_node_attrib *na = na = iscsit_tpg_get_node_attrib(sess);
> +	struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
>  
>  	spin_lock_bh(&cmd->dataout_timeout_lock);
>  	if (!(cmd->dataout_timer_flags & ISCSI_TF_RUNNING)) {
> @@ -1261,7 +1261,7 @@ void iscsit_start_dataout_timer(
>  	struct iscsi_conn *conn)
>  {
>  	struct iscsi_session *sess = conn->sess;
> -	struct iscsi_node_attrib *na = na = iscsit_tpg_get_node_attrib(sess);
> +	struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
>  
>  	if (cmd->dataout_timer_flags & ISCSI_TF_RUNNING)
>  		return;
> -- 

Copy and paste error.  :(

Applied to lio-core, and thanks for catching this Jesper!


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ