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]
Date:	Fri, 28 Mar 2008 16:16:07 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	akpm@...ux-foundation.org
Cc:	netdev@...r.kernel.org, fubar@...ibm.com
Subject: Re: [patch 2/4] drivers/net/bonding/bond_sysfs.c: suppress
 uninitialized var warning

From: akpm@...ux-foundation.org
Date: Fri, 28 Mar 2008 14:37:30 -0700

> From: Andrew Morton <akpm@...ux-foundation.org>
> 
> drivers/net/bonding/bond_sysfs.c: In function `bonding_store_slaves':
> drivers/net/bonding/bond_sysfs.c:250: warning: 'original_mtu' might be used uninitialized in this function
> 
> Cc: Jay Vosburgh <fubar@...ibm.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>

Barf!

I'll fix it like this:

commit 6952d8923bcc8d6b8b43b065cfe9a31bb24f0d58
Author: David S. Miller <davem@...emloft.net>
Date:   Fri Mar 28 16:15:38 2008 -0700

    [BOND]: Fix warning in bond_sysfs.c
    
    original_mtu is only used if we end up with a non-NULL
    dev, and it is assigned in all such cases, but GCC can't
    see that.
    
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 90a1f31..979c2d0 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d,
 
 	if (command[0] == '-') {
 		dev = NULL;
+		original_mtu = 0;
 		bond_for_each_slave(bond, slave, i)
 			if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
 				dev = slave->dev;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ