Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

K. Y. Srinivasan and committed by
Greg Kroah-Hartman
565ce642 dfc568e6

+3 -2
+3 -2
drivers/hv/channel_mgmt.c
··· 203 203 struct vmbus_channel *primary_channel; 204 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 208 memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); 208 209 msg.child_relid = channel->offermsg.child_relid; 209 210 msg.header.msgtype = CHANNELMSG_RELID_RELEASED; ··· 217 216 } else { 218 217 primary_channel = channel->primary_channel; 219 218 spin_lock_irqsave(&primary_channel->sc_lock, flags); 220 - list_del(&channel->listentry); 219 + list_del(&channel->sc_list); 221 220 spin_unlock_irqrestore(&primary_channel->sc_lock, flags); 222 221 } 223 222 free_channel(channel);