summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2013-10-16 19:27:19 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 10:42:16 -0800
commit8e38dd51c4a7d8f1ebc7be92dc0219bcb1132e4a (patch)
tree4f65832ed059a3b5f2daf650258ff50290629dff
parent35337647868438fa06171a1a23fc66e7efdba55a (diff)
downloadlwn-8e38dd51c4a7d8f1ebc7be92dc0219bcb1132e4a.tar.gz
lwn-8e38dd51c4a7d8f1ebc7be92dc0219bcb1132e4a.zip
Drivers: hv: vmbus: Fix a bug in channel rescind code
commit 565ce6422ff92f5af71e4d5a09f78215433b2695 upstream. Rescind of subchannels were not being correctly handled. Fix the bug. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/channel_mgmt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 461f47b6691e..6f1b5e6b44a0 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -172,7 +172,8 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
struct vmbus_channel *primary_channel;
struct vmbus_channel_relid_released msg;
- vmbus_device_unregister(channel->device_obj);
+ if (channel->device_obj)
+ 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;
@@ -185,7 +186,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
} else {
primary_channel = channel->primary_channel;
spin_lock_irqsave(&primary_channel->sc_lock, flags);
- list_del(&channel->listentry);
+ list_del(&channel->sc_list);
spin_unlock_irqrestore(&primary_channel->sc_lock, flags);
}
free_channel(channel);