public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
	jasowang@redhat.com, sitsofe@gmail.com, decui@microsoft.com
Cc: "K. Y. Srinivasan" <kys@microsoft.com>, <stable@vger.kernel.org>
Subject: [PATCH V2 5/5] Drivers: hv: vmbus: Fix a bug in vmbus_open()
Date: Wed, 27 Aug 2014 16:25:35 -0700	[thread overview]
Message-ID: <1409181935-23295-5-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1409181935-23295-1-git-send-email-kys@microsoft.com>

Fix a bug in vmbus_open() and properly propagate the error. I would
like to thank Dexuan Cui <decui@microsoft.com> for identifying the
issue.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
---
 drivers/hv/channel.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 9a6a2c3..19bad59 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -165,8 +165,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 	ret = vmbus_post_msg(open_msg,
 			       sizeof(struct vmbus_channel_open_channel));
 
-	if (ret != 0)
+	if (ret != 0) {
+		err = ret;
 		goto error1;
+	}
 
 	t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ);
 	if (t == 0) {
-- 
1.7.4.1


  parent reply	other threads:[~2014-08-27 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 23:25 [PATCH V2 0/5] Drivers: hv: vmbus: Eliminate calls to BUG_ON() K. Y. Srinivasan
2014-08-27 23:25 ` [PATCH V2 1/5] Drivers: hv: vmbus: Cleanup vmbus_post_msg() K. Y. Srinivasan
2014-08-27 23:25   ` [PATCH V2 2/5] Drivers: hv: vmbus: Cleanup vmbus_teardown_gpadl() K. Y. Srinivasan
2014-08-27 23:25   ` [PATCH V3 3/5] Drivers: hv: vmbus: Cleanup vmbus_close_internal() K. Y. Srinivasan
2014-08-27 23:25   ` [PATCH V2 4/5] Drivers: hv: vmbus: Cleanup vmbus_establish_gpadl() K. Y. Srinivasan
2014-08-27 23:25   ` K. Y. Srinivasan [this message]
2014-08-29  7:29 ` [PATCH V2 0/5] Drivers: hv: vmbus: Eliminate calls to BUG_ON() Sitsofe Wheeler
2014-09-15 18:39   ` KY Srinivasan
2014-09-23 18:41     ` KY Srinivasan

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=1409181935-23295-5-git-send-email-kys@microsoft.com \
    --to=kys@microsoft.com \
    --cc=apw@canonical.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=sitsofe@gmail.com \
    --cc=stable@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