From: Veaceslav Falico <vfalico@redhat.com>
To: Scott Feldman <sfeldma@cumulusnetworks.com>
Cc: fubar@us.ibm.com, andy@greyhouse.net, netdev@vger.kernel.org,
roopa@cumulusnetworks.com, shm@cumulusnetworks.com
Subject: Re: [PATCH net-next 1/2] bonding: add sysfs /slave dir for bond slave devices.
Date: Thu, 16 Jan 2014 19:44:41 +0100 [thread overview]
Message-ID: <20140116184441.GB24396@redhat.com> (raw)
In-Reply-To: <20140116055434.32220.89883.stgit@monster-03.cumulusnetworks.com>
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.
next prev parent reply other threads:[~2014-01-16 18:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 5:54 [PATCH net-next 1/2] bonding: add sysfs /slave dir for bond slave devices Scott Feldman
2014-01-16 8:04 ` Ding Tianhong
2014-01-16 15:31 ` Veaceslav Falico
2014-01-16 18:04 ` Scott Feldman
2014-01-16 18:40 ` Veaceslav Falico
2014-01-16 18:44 ` Veaceslav Falico [this message]
2014-01-16 19:00 ` Scott Feldman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140116184441.GB24396@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@cumulusnetworks.com \
--cc=shm@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).