Commit 50229128 authored by Dexuan Cui's avatar Dexuan Cui Committed by Greg Kroah-Hartman

Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()

I didn't really hit a real bug, but just happened to spot the bug:
we have decreased the counter at the beginning of vmbus_process_offer(),
so we mustn't decrease it again.

Fixes: 6f3d791f ("Drivers: hv: vmbus: Fix rescind handling issues")
Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
Cc: stable@vger.kernel.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Stable <stable@vger.kernel.org> # 4.14 and above
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71b38245
...@@ -527,10 +527,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) ...@@ -527,10 +527,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
struct hv_device *dev struct hv_device *dev
= newchannel->primary_channel->device_obj; = newchannel->primary_channel->device_obj;
if (vmbus_add_channel_kobj(dev, newchannel)) { if (vmbus_add_channel_kobj(dev, newchannel))
atomic_dec(&vmbus_connection.offer_in_progress);
goto err_free_chan; goto err_free_chan;
}
if (channel->sc_creation_callback != NULL) if (channel->sc_creation_callback != NULL)
channel->sc_creation_callback(newchannel); channel->sc_creation_callback(newchannel);
......
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