Commit 656c5ba5 authored by Saurabh Sengar's avatar Saurabh Sengar Committed by Wei Liu

Drivers: hv: vmbus: Release cpu lock in error case

In case of invalid sub channel, release cpu lock before returning.

Fixes: a949e86c ("Drivers: hv: vmbus: Resolve race between init_vp_index() and CPU hotplug")
Signed-off-by: default avatarSaurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1654794996-13244-1-git-send-email-ssengar@linux.microsoft.comSigned-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent f5f93d7f
......@@ -639,6 +639,7 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
*/
if (newchannel->offermsg.offer.sub_channel_index == 0) {
mutex_unlock(&vmbus_connection.channel_mutex);
cpus_read_unlock();
/*
* Don't call free_channel(), because newchannel->kobj
* is not initialized yet.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment