Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932284AbdC1Mld (ORCPT ); Tue, 28 Mar 2017 08:41:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60074 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932257AbdC1Mlb (ORCPT ); Tue, 28 Mar 2017 08:41:31 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "K. Y. Srinivasan" Subject: [PATCH 4.10 101/111] Drivers: hv: vmbus: Dont leak channel ids Date: Tue, 28 Mar 2017 14:31:27 +0200 Message-Id: <20170328122919.820787517@linuxfoundation.org> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170328122915.640228468@linuxfoundation.org> References: <20170328122915.640228468@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 826 Lines: 29 4.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: K. Y. Srinivasan commit 9a5476020a5f06a0fc6f17097efc80275d2f03cd upstream. If we cannot allocate memory for the channel, free the relid associated with the channel. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel_mgmt.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -779,6 +779,7 @@ static void vmbus_onoffer(struct vmbus_c /* 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; }