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: <20091120174328.GB14888@kroah.com>
Date:	Fri, 20 Nov 2009 09:43:28 -0800
From:	Greg KH <greg@...ah.com>
To:	Jiri Slaby <jslaby@...ell.com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH 1/1] Char: cyclades, fix compiler warning

On Wed, Nov 18, 2009 at 01:18:22PM +0100, Jiri Slaby wrote:
> With gcc 4.0.2:
> drivers/char/cyclades.c: In function 'cyy_interrupt':
> drivers/char/cyclades.c:581: warning: 'info' may be used uninitialized in this function
> 
> introduced by
> 
> : commit 3aeea5b92210083c7cffd4f08a0bb141d3f2d574
> : Author:     Jiri Slaby <jirislaby@...il.com>
> : AuthorDate: Sat Sep 19 13:13:16 2009 -0700
> : Commit:     Live-CD User <linux@...ux.site>
> : CommitDate: Sat Sep 19 13:13:16 2009 -0700
> :
> :    cyclades: introduce cyy_readb/writeb
> 
> In fact the true branch which uses uninitialized 'info' can never
> happen because chip is always less than ->nchips and channel is
> always less than 4 which we alloc.
> 
> So behave similar to rx handling and remove the test completely.
> 
> I wonder why gcc 4.4.1 doesn't spit a word.
> 
> Reported-by: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Alan Cox <alan@...ux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh@...e.de>
> Signed-off-by: Jiri Slaby <jslaby@...ell.com>
> ---
>  drivers/char/cyclades.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
> index a188c05..e026f24 100644
> --- a/drivers/char/cyclades.c
> +++ b/drivers/char/cyclades.c
> @@ -595,14 +595,8 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
>  	channel = save_xir & CyIRChannel;
>  	save_car = readb(base_addr + (CyCAR << index));
>  	cy_writeb(base_addr + (CyCAR << index), save_xir);
> -	info = &cinfo->ports[channel + chip * 4];
>  
> -	/* validate the port# (as configured and open) */
> -	if (channel + chip * 4 >= cinfo->nports) {
> -		cy_writeb(base_addr + (CySRER << index),
> -			  readb(base_addr + (CySRER << index)) & ~CyTxRdy);
> -		goto end;
> -	}
> +	info = &cinfo->ports[channel + chip * 4];

Wierd, but this doesn't apply at all to my or Linus's tree.  Are there
some other cyclades patch floating around out there that is needed here
before this one?

thanks,

greg k-h
--
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