Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751043AbdCNMtc (ORCPT ); Tue, 14 Mar 2017 08:49:32 -0400 Received: from mail-by2nam03on0122.outbound.protection.outlook.com ([104.47.42.122]:45285 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750797AbdCNMta (ORCPT ); Tue, 14 Mar 2017 08:49:30 -0400 From: Dexuan Cui To: KY Srinivasan , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" , "leann.ogasawara@canonical.com" , "marcelo.cerri@canonical.com" CC: "stable@vger.kernel.org" Subject: RE: [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids Thread-Topic: [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids Thread-Index: AQHSnE1eR0jMdaSuOEiZjlQRzV3pgaGUSKyA Date: Tue, 14 Mar 2017 12:49:26 +0000 Message-ID: References: <1489445829-15292-1-git-send-email-kys@exchange.microsoft.com> In-Reply-To: <1489445829-15292-1-git-send-email-kys@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [167.220.255.28] x-ms-office365-filtering-correlation-id: 9ef5449e-1ca9-4e85-67ae-08d46ad88c93 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:MWHPR03MB2493; x-microsoft-exchange-diagnostics: 1;MWHPR03MB2493;7:+1Nb6VKFKcQe9qY5JVG6Q3VgPys0YTW159RwdZQ3QL3fZW47TrQ+DWkd/ri2p4lqArEiM4ceZWlh1xaYXVr61tvcjWpVxkoQtZEJoh660MuL5Rtx44aG4m3sbU5vyQBetePNS9/7uu/KrG9L5RNXdyx7A2JjaV2ppg25mEoL7/vtJVKKagSlLHcCk3V67n3UUimtrbgwYoOSLWEr6IyWNlRdoEiXqZa+rHXGxZHkRV8aJjR/awhQOQLyD4P5Lj7tvXga9/UJ9cbsHsmYayksT27zxSypM64vSjXnARlaTvo4rvMq20Xkp4x4ZJ89oNF2ySxMTmKeCsna3rzzTegJSWL/SOT3IdwXe4DJB8MqXcA= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(140211028294663); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558025)(6072148)(6042181);SRVR:MWHPR03MB2493;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2493; x-forefront-prvs: 02462830BE x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(8676002)(2900100001)(106116001)(8936002)(6246003)(5005710100001)(6436002)(77096006)(10090500001)(55016002)(122556002)(25786008)(6506006)(229853002)(10290500002)(4326008)(99286003)(38730400002)(5660300001)(81166006)(102836003)(1511001)(53936002)(9686003)(86362001)(2561002)(86612001)(7736002)(6116002)(66066001)(2201001)(74316002)(305945005)(3846002)(2906002)(2501003)(7696004)(189998001)(76176999)(50986999)(33656002)(3280700002)(3660700001)(54356999)(2950100002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR03MB2493;H:MWHPR03MB2669.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2017 12:49:26.7391 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2493 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2ECnZ7B024688 Content-Length: 889 Lines: 26 > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of kys@exchange.microsoft.com > > 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; > } The patch seems good. BTW, vmbus_onoffer -> alloc_channel is only called in the workqueue context, so maybe we should change the atomic kzalloc in alloc_channel to GFP_KERNEL? Thanks, -- Dexuan