Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599905

[PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids

From kys@exchange.microsoft.com
Newsgroups linux.kernel
Subject [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids
Date 2017-03-14 00:00 +0100
Message-ID <tkH6x-7El-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: K. Y. Srinivasan <kys@microsoft.com>

If we cannot allocate memory for the channel, free the relid
associated with the channel.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
---
 drivers/hv/channel_mgmt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index e1a3ae4..0a85246 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -802,6 +802,7 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
 	/* Allocate the channel object and save this offer. */
 	newchannel = alloc_channel();
 	if (!newchannel) {
+		vmbus_release_relid(offer->child_relid);
 		pr_err("Unable to allocate channel object\n");
 		return;
 	}
-- 
1.7.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids kys@exchange.microsoft.com - 2017-03-14 00:00 +0100
  RE: [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids Dexuan Cui <decui@microsoft.com> - 2017-03-14 13:50 +0100
    RE: [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids KY Srinivasan <kys@microsoft.com> - 2017-03-14 15:40 +0100

csiph-web