From: Nishank Trivedi <nistrive@cisco.com>
To: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Neel Patel <neepatel@cisco.com>,
Christian Benvenuti <benve@cisco.com>
Subject: Re: [PATCH] drivers/net: enic: release rtnl_lock on error-path
Date: Mon, 08 Jul 2013 09:26:11 -0700 [thread overview]
Message-ID: <51DAE823.4030406@cisco.com> (raw)
In-Reply-To: <20130708072251.20540.50413.stgit@zurg>
On 7/8/13 12:22 AM, Konstantin Khlebnikov wrote:
> 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;
> }
>
Acked.
Thanks.
next prev parent reply other threads:[~2013-07-08 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 7:22 [PATCH] drivers/net: enic: release rtnl_lock on error-path Konstantin Khlebnikov
2013-07-08 16:26 ` Nishank Trivedi [this message]
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=51DAE823.4030406@cisco.com \
--to=nistrive@cisco.com \
--cc=benve@cisco.com \
--cc=khlebnikov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neepatel@cisco.com \
--cc=netdev@vger.kernel.org \
/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