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
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 6/6] Drivers: hv: vmbus: Handle channel rescind message correctly
Date: Fri, 8 Mar 2013 14:16:13 -0800 [thread overview]
Message-ID: <1362780973-9837-6-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1362780973-9837-1-git-send-email-kys@microsoft.com>
Properly cleanup the channel state on receipt of the "offer rescind" message.
Starting with ws2012, the host requires that the channel "relid" be properly
cleaned up when the offer is rescinded.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/hv/channel_mgmt.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ff1be16..bad8128 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -165,8 +165,19 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
struct vmbus_channel *channel = container_of(work,
struct vmbus_channel,
work);
+ unsigned long flags;
+ struct vmbus_channel_relid_released msg;
vmbus_device_unregister(channel->device_obj);
+ memset(&msg, 0, sizeof(struct vmbus_channel_relid_released));
+ msg.child_relid = channel->offermsg.child_relid;
+ msg.header.msgtype = CHANNELMSG_RELID_RELEASED;
+ vmbus_post_msg(&msg, sizeof(struct vmbus_channel_relid_released));
+
+ spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
+ list_del(&channel->listentry);
+ spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
+ free_channel(channel);
}
void vmbus_free_channels(void)
--
1.7.4.1
next prev parent reply other threads:[~2013-03-08 21:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 22:15 [PATCH 0/6] Drivers: hv K. Y. Srinivasan
2013-03-08 22:16 ` [PATCH 1/6] Drivers: hv: balloon: Do not request completion notification K. Y. Srinivasan
2013-03-08 22:16 ` [PATCH 2/6] Drivers: hv: balloon: Execute balloon inflation in a separate context K. Y. Srinivasan
2013-03-08 22:16 ` [PATCH 3/6] Drivers: hv: balloon: Execute hot-add code " K. Y. Srinivasan
2013-03-08 22:16 ` [PATCH 4/6] Drivers: hv: balloon: Make the balloon driver not unloadable K. Y. Srinivasan
2013-03-08 22:16 ` [PATCH 5/6] Drivers: hv: balloon: Implement hot-add functionality K. Y. Srinivasan
2013-03-12 2:54 ` KY Srinivasan
2013-03-12 16:07 ` gregkh
2013-03-12 16:14 ` KY Srinivasan
2013-03-08 22:16 ` K. Y. Srinivasan [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-03-15 19:25 [PATCH 0/6] Drivers: hv K. Y. Srinivasan
2013-03-15 19:25 ` [PATCH 1/6] Drivers: hv: balloon: Do not request completion notification K. Y. Srinivasan
2013-03-15 19:25 ` [PATCH 6/6] Drivers: hv: vmbus: Handle channel rescind message correctly K. Y. 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=1362780973-9837-6-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
/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