All of lore.kernel.org
 help / color / mirror / Atom feed
* patch "Drivers: hv: vmbus: Don't leak channel ids" added to char-misc-linus
@ 2017-03-16  7:45 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-16  7:45 UTC (permalink / raw)
  To: kys, gregkh, stable


This is a note to let you know that I've just added the patch titled

    Drivers: hv: vmbus: Don't leak channel ids

to my char-misc git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.

If you have any questions about this process, please let me know.


>From 9a5476020a5f06a0fc6f17097efc80275d2f03cd Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Mon, 13 Mar 2017 15:57:09 -0700
Subject: Drivers: hv: vmbus: Don't leak channel ids

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hv/channel_mgmt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index bf846d078d85..fbcb06352308 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -796,6 +796,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;
 	}
-- 
2.12.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-16  7:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16  7:45 patch "Drivers: hv: vmbus: Don't leak channel ids" added to char-misc-linus gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.