Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932257AbbBOS5X (ORCPT ); Sun, 15 Feb 2015 13:57:23 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:41706 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755250AbbBOS5P (ORCPT ); Sun, 15 Feb 2015 13:57:15 -0500 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com Cc: "K. Y. Srinivasan" Subject: [PATCH 5/6] Drivers: hv: util: On device remove, close the channel after de-initializing the service Date: Sun, 15 Feb 2015 12:11:39 -0800 Message-Id: <1424031100-21749-5-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1424031100-21749-1-git-send-email-kys@microsoft.com> References: <1424031079-21708-1-git-send-email-kys@microsoft.com> <1424031100-21749-1-git-send-email-kys@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 31 When the offer is rescinded, vmbus_close() can free up the channel; deinitialize the service before closing the channel. Signed-off-by: K. Y. Srinivasan --- drivers/hv/hv_util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index c5be773..7994ec2 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -380,9 +380,9 @@ static int util_remove(struct hv_device *dev) { struct hv_util_service *srv = hv_get_drvdata(dev); - vmbus_close(dev->channel); if (srv->util_deinit) srv->util_deinit(); + vmbus_close(dev->channel); kfree(srv->recv_buffer); return 0; -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/