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:	Thu, 16 Jan 2014 11:00:25 -0800
From:	Scott Feldman <sfeldma@...ulusnetworks.com>
To:	Veaceslav Falico <vfalico@...hat.com>
Cc:	Jay Vosburgh <fubar@...ibm.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	Netdev <netdev@...r.kernel.org>,
	Roopa Prabhu <roopa@...ulusnetworks.com>,
	Shrijeet Mukherjee <shm@...ulusnetworks.com>
Subject: Re: [PATCH net-next 1/2] bonding: add sysfs /slave dir for bond slave devices.

On Jan 16, 2014, at 10:44 AM, Veaceslav Falico <vfalico@...hat.com> wrote:

> On Wed, Jan 15, 2014 at 09:54:34PM -0800, Scott Feldman wrote:
> ...snip...
>> +	res = bond_sysfs_slave_add(new_slave);
>> +	if (res) {
>> +		pr_debug("Error %d calling bond_sysfs_slave_add\n", res);
>> +		goto err_upper_unlink;
>> +	}
>> +
>> 	bond->slave_cnt++;
>> 	bond_compute_features(bond);
>> 	bond_set_carrier(bond);
>> @@ -1595,6 +1617,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
>> 	return 0;
>> 
>> /* Undo stages on error */
>> +err_upper_unlink:
>> +	bond_upper_dev_unlink(bond_dev, slave_dev);
>> +
>> err_unregister:
>> 	netdev_rx_handler_unregister(slave_dev);
>> 
> 
> In case bond_sysfs_slave_add() creates the kobject, but fails to create the
> attributes, we'll end up with a mem leak, as we don't do kobject_put() on
> it.

I’ll fix this and the other one Ding found and send v2.  Thanks for reviewing!

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