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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1202132152050.16039@swampdragon.chaosbits.net>
Date:	Mon, 13 Feb 2012 21:52:37 +0100 (CET)
From:	Jesper Juhl <jj@...osbits.net>
To:	xfs@....sgi.com
cc:	xfs-masters@....sgi.com, linux-kernel@...r.kernel.org,
	Alex Elder <elder@...nel.org>, Ben Myers <bpm@....com>
Subject: Re: [PATCH] XFS; xfs_trans_add_item() - don't assign in ASSERT()
 when compare is intended

On Mon, 13 Feb 2012, Jesper Juhl wrote:

> It looks to me like the two ASSERT()s in xfs_trans_add_item() really
> want to do a compare (==) rather than assignment (=).
> This patch changes it from the former to the latter.
> 
Ehh, I mean from the latter to the former, of course.. :-/

> I must admit though, that I don't know this code well and have only
> compile tested this change. But if assignment is really intended it
> really seems strange to do it as part of an ASSERT...
> 
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
> ---
>  fs/xfs/xfs_trans.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index 329b06a..7adcdf1 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -1151,8 +1151,8 @@ xfs_trans_add_item(
>  {
>  	struct xfs_log_item_desc *lidp;
>  
> -	ASSERT(lip->li_mountp = tp->t_mountp);
> -	ASSERT(lip->li_ailp = tp->t_mountp->m_ail);
> +	ASSERT(lip->li_mountp == tp->t_mountp);
> +	ASSERT(lip->li_ailp == tp->t_mountp->m_ail);
>  
>  	lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS);
>  
> 

-- 
Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
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