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]
Date:	Wed, 24 Nov 2010 14:19:35 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	x86@...nel.org
Subject: Re: [PATCH] x86, dumpstack: Fix unused variable warning.

2010/11/24 Rakib Mullick <rakib.mullick@...il.com>:
> With allnoconfig, bp becomes unused. So put bp into defination of
> CONFIG_FRAME_POINTER.
>
> arch/x86/kernel/dumpstack.c: In function ‘dump_stack’:
> arch/x86/kernel/dumpstack.c:200: warning: unused variable ‘bp’
>
> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
> ---
>
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> index 8474c99..fc5a253 100644
> --- a/arch/x86/kernel/dumpstack.c
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -197,10 +197,10 @@ void show_stack(struct task_struct *task,
> unsigned long *sp)
>  */
>  void dump_stack(void)
>  {
> -       unsigned long bp = 0;
>        unsigned long stack;
>
>  #ifdef CONFIG_FRAME_POINTER
> +       unsigned long bp = 0;
>        if (!bp)
>                get_bp(bp);
>  #endif
>

Looks like you can even remove that block. bp is not used any more in
this function.
get_bp() was only loading bp but did not make any use of it.

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