From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Neel Patel <neepatel@cisco.com>,
Nishank Trivedi <nistrive@cisco.com>,
Roopa Prabhu <roprabhu@cisco.com>,
Christian Benvenuti <benve@cisco.com>
Subject: [PATCH] drivers/net: enic: release rtnl_lock on error-path
Date: Mon, 08 Jul 2013 11:22:51 +0400 [thread overview]
Message-ID: <20130708072251.20540.50413.stgit@zurg> (raw)
enic_change_mtu_work() must call rtnl_unlock() on all exiting paths.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Christian Benvenuti <benve@cisco.com>
Cc: Roopa Prabhu <roprabhu@cisco.com>
Cc: Neel Patel <neepatel@cisco.com>
Cc: Nishank Trivedi <nistrive@cisco.com>
---
drivers/net/ethernet/cisco/enic/enic_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 635f559..992ec2e 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -1761,6 +1761,7 @@ static void enic_change_mtu_work(struct work_struct *work)
enic_synchronize_irqs(enic);
err = vnic_rq_disable(&enic->rq[0]);
if (err) {
+ rtnl_unlock();
netdev_err(netdev, "Unable to disable RQ.\n");
return;
}
@@ -1773,6 +1774,7 @@ static void enic_change_mtu_work(struct work_struct *work)
vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf);
/* Need at least one buffer on ring to get going */
if (vnic_rq_desc_used(&enic->rq[0]) == 0) {
+ rtnl_unlock();
netdev_err(netdev, "Unable to alloc receive buffers.\n");
return;
}
next reply other threads:[~2013-07-08 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 7:22 Konstantin Khlebnikov [this message]
2013-07-08 16:26 ` [PATCH] drivers/net: enic: release rtnl_lock on error-path Nishank Trivedi
2013-07-08 16:26 ` Neel Patel (neepatel)
2013-07-09 19:56 ` David Miller
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=20130708072251.20540.50413.stgit@zurg \
--to=khlebnikov@openvz.org \
--cc=benve@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neepatel@cisco.com \
--cc=netdev@vger.kernel.org \
--cc=nistrive@cisco.com \
--cc=roprabhu@cisco.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