diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2013-10-16 22:27:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 22:53:46 -0400 |
commit | 565ce6422ff92f5af71e4d5a09f78215433b2695 (patch) | |
tree | 869cb9acab866835b24f49fbd2e4b2dbfa075962 /drivers/hv | |
parent | dfc568e6bc08916f1035af456e4631c47166b5cf (diff) |
Drivers: hv: vmbus: Fix a bug in channel rescind code
Rescind of subchannels were not being correctly handled. Fix the bug.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org> [3.11+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/channel_mgmt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index bbff5f200bef..fa920469bf10 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c | |||
@@ -203,7 +203,8 @@ static void vmbus_process_rescind_offer(struct work_struct *work) | |||
203 | struct vmbus_channel *primary_channel; | 203 | struct vmbus_channel *primary_channel; |
204 | struct vmbus_channel_relid_released msg; | 204 | struct vmbus_channel_relid_released msg; |
205 | 205 | ||
206 | vmbus_device_unregister(channel->device_obj); | 206 | if (channel->device_obj) |
207 | vmbus_device_unregister(channel->device_obj); | ||
207 | memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); | 208 | memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); |
208 | msg.child_relid = channel->offermsg.child_relid; | 209 | msg.child_relid = channel->offermsg.child_relid; |
209 | msg.header.msgtype = CHANNELMSG_RELID_RELEASED; | 210 | msg.header.msgtype = CHANNELMSG_RELID_RELEASED; |
@@ -216,7 +217,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work) | |||
216 | } else { | 217 | } else { |
217 | primary_channel = channel->primary_channel; | 218 | primary_channel = channel->primary_channel; |
218 | spin_lock_irqsave(&primary_channel->sc_lock, flags); | 219 | spin_lock_irqsave(&primary_channel->sc_lock, flags); |
219 | list_del(&channel->listentry); | 220 | list_del(&channel->sc_list); |
220 | spin_unlock_irqrestore(&primary_channel->sc_lock, flags); | 221 | spin_unlock_irqrestore(&primary_channel->sc_lock, flags); |
221 | } | 222 | } |
222 | free_channel(channel); | 223 | free_channel(channel); |