Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 565ce642 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: Fix a bug in channel rescind code



Rescind of subchannels were not being correctly handled. Fix the bug.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>        [3.11+]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfc568e6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
	struct vmbus_channel *primary_channel;
	struct vmbus_channel_relid_released msg;

	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;
@@ -216,7 +217,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);