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: <20110611205057.4b9bf462@maggie>
Date:	Sat, 11 Jun 2011 20:50:57 +0200
From:	Michael Büsch <m@...s.ch>
To:	Connor Hansen <cmdkhh@...il.com>
Cc:	mb@...sch.de, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/ssb/driver_chipcommon_pmu.c: uninitilized
 warning

On Sat, 11 Jun 2011 11:14:45 -0700
Connor Hansen <cmdkhh@...il.com> wrote:

> warning message
> drivers/ssb/driver_chipcommon_pmu.c: In function ssb_pmu_resources_init
> drivers/ssb/driver_chipcommon_pmu.c:420:15: warning: updown_tab_size may
> be used uninitilized in this function.
> 
> updown_tab_size and depend_tab_size may not be set in the bus->chip_id
> switch statement, so set to 0 by default to avoid using uninitialized
> stack space.

We wouldn't be using uninitialized stack space or uninitialized variables,
without this patch. However, for the sake of shutting up the compiler, ACK.

> Signed-off-by: Connor Hansen <cmdkhh@...il.com>
> ---
>  drivers/ssb/driver_chipcommon_pmu.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c
> index 305ade7..a7aef47 100644
> --- a/drivers/ssb/driver_chipcommon_pmu.c
> +++ b/drivers/ssb/driver_chipcommon_pmu.c
> @@ -417,9 +417,9 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc)
>  	u32 min_msk = 0, max_msk = 0;
>  	unsigned int i;
>  	const struct pmu_res_updown_tab_entry *updown_tab = NULL;
> -	unsigned int updown_tab_size;
> +	unsigned int updown_tab_size = 0;
>  	const struct pmu_res_depend_tab_entry *depend_tab = NULL;
> -	unsigned int depend_tab_size;
> +	unsigned int depend_tab_size = 0;
>  
>  	switch (bus->chip_id) {
>  	case 0x4312:

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