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>] [day] [month] [year] [list]
Date:	Mon, 22 Oct 2007 21:44:26 +0200 (MEST)
From:	Mikael Pettersson <mikpe@...uu.se>
To:	Deepak Saxena <dsaxena@...xity.net>
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [PATCH 2.6.23] uninitialised variable in ARM/ixp4xx clockevents code

Compiling kernel 2.6.23 for an ARM/ixp4xx machine results in:

arch/arm/mach-ixp4xx/common.c: In function 'ixp4xx_set_mode':
arch/arm/mach-ixp4xx/common.c:445: warning: 'opts' may be used uninitialized in this function

The warning is valid: if ixp4xx_set_mode() is called with mode
CLOCK_EVT_MODE_RESUME, then 'opts' will be uninitialised at the
'*IXP4XX_OSRT1 = osrt | opts;' statement.

Initialising opts to zero in this case may not be correct, but
at least it's better than writing random junk to the hardware.

Signed-off-by: Mikael Pettersson <mikpe@...uu.se>
--
I'm not cc:ing linux-arm-kernel since that's subscribers-only.
This code hasn't changed in 2.6.23-git17.

 arch/arm/mach-ixp4xx/common.c |    1 +
 1 files changed, 1 insertion(+)

--- linux-2.6.23/arch/arm/mach-ixp4xx/common.c.~1~	2007-10-22 20:26:50.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-ixp4xx/common.c	2007-10-22 21:22:10.000000000 +0200
@@ -460,6 +460,7 @@ static void ixp4xx_set_mode(enum clock_e
 		osrt = opts = 0;
 		break;
 	case CLOCK_EVT_MODE_RESUME:
+		opts = 0;
 		break;
 	}
 
-
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