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]
Message-ID: <1306914775.10976.6.camel@vkoul-udesk3>
Date:	Wed, 01 Jun 2011 13:22:55 +0530
From:	"Koul, Vinod" <vinod.koul@...el.com>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Dan Williams <dan.j.williams@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma: Initialize uninitialized variable

On Wed, 2011-05-25 at 23:48 -0700, Guenter Roeck wrote:
> Uninitialized variable results in random debug output.
> Fix by initializing to 0.
> 
> This commit fixes the following warning:
> 
> drivers/dma/pch_dma.c: In function pdc_desc_get:
> drivers/dma/pch_dma.c:406: warning: i may be used uninitialized in this function
> 
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
>  drivers/dma/pch_dma.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
Sorry I seem to have missed this earlier. This fix is already in place

commit 364de77831213be20f7f33c39ca1c194593b5c11
Author: Liu Yuan <tailai.ly@...bao.com>
Date:   Sat Apr 2 14:20:47 2011 +0800

    drivers, pch_dma: Fix uninitialized var before use
    
    In the function pdc_desc_get(), var 'i' is not
    initialized before use. This patch fixes it.
    
    Signed-off-by: Liu Yuan <tailai.ly@...bao.com>
    Signed-off-by: Vinod Koul <vinod.koul@...el.com>

~Vinod

> diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
> index 8d8fef1..6eebc62 100644
> --- a/drivers/dma/pch_dma.c
> +++ b/drivers/dma/pch_dma.c
> @@ -403,7 +403,7 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)
>  {
>  	struct pch_dma_desc *desc, *_d;
>  	struct pch_dma_desc *ret = NULL;
> -	int i;
> +	int i = 0;
>  
>  	spin_lock(&pd_chan->lock);
>  	list_for_each_entry_safe(desc, _d, &pd_chan->free_list, desc_node) {

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