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:	Fri, 24 Dec 2010 23:22:11 +0100
From:	Edward Shishkin <edward.shishkin@...il.com>
To:	Jesper Juhl <jj@...osbits.net>
CC:	reiserfs-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] reiserfs: Make sure va_end() is always called after va_start().

Jesper Juhl wrote:
> Greetings,
>
> A call to va_start() must always be followed by a call to va_end() in the 
> same function. In fs/reiserfs/prints.c::print_block() this is not always 
> the case. If 'bh' is NULL we'll return without calling va_end().
> One could add a call to va_end() before the 'return' statement, but it's 
> nicer to just move the call to va_start() after the test for 'bh' being 
> NULL.
>
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
>   

Acked-by: Edward Shishkin <edward.shishkin@...il.com>

> ---
>  prints.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
> index adbc6f5..45de98b 100644
> --- a/fs/reiserfs/prints.c
> +++ b/fs/reiserfs/prints.c
> @@ -586,13 +586,13 @@ void print_block(struct buffer_head *bh, ...)	//int print_mode, int first, int l
>  	va_list args;
>  	int mode, first, last;
>  
> -	va_start(args, bh);
> -
>  	if (!bh) {
>  		printk("print_block: buffer is NULL\n");
>  		return;
>  	}
>  
> +	va_start(args, bh);
> +
>  	mode = va_arg(args, int);
>  	first = va_arg(args, int);
>  	last = va_arg(args, int);
>
>
>
>   

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