From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:37370 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbeFEUjA (ORCPT ); Tue, 5 Jun 2018 16:39:00 -0400 From: kys@linuxonhyperv.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, sthemmin@microsoft.com, Michael.H.Kelley@microsoft.com, vkuznets@redhat.com Cc: Dexuan Cui , stable@vger.kernel.org, "K . Y . Srinivasan" Subject: [PATCH 4/8] Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer() Date: Tue, 5 Jun 2018 13:37:52 -0700 Message-Id: <20180605203756.29809-4-kys@linuxonhyperv.com> In-Reply-To: <20180605203756.29809-1-kys@linuxonhyperv.com> References: <20180605203536.29751-1-kys@linuxonhyperv.com> <20180605203756.29809-1-kys@linuxonhyperv.com> Reply-To: kys@microsoft.com Sender: stable-owner@vger.kernel.org List-ID: From: Dexuan Cui 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: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues") Signed-off-by: Dexuan Cui Cc: stable@vger.kernel.org Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Stable # 4.14 and above Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel_mgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index ecc2bd275a73..f3b551a50653 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -527,10 +527,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) struct hv_device *dev = newchannel->primary_channel->device_obj; - if (vmbus_add_channel_kobj(dev, newchannel)) { - atomic_dec(&vmbus_connection.offer_in_progress); + if (vmbus_add_channel_kobj(dev, newchannel)) goto err_free_chan; - } if (channel->sc_creation_callback != NULL) channel->sc_creation_callback(newchannel); -- 2.17.1