Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752320AbdCNOe0 (ORCPT ); Tue, 14 Mar 2017 10:34:26 -0400 Received: from mail-by2nam01on0105.outbound.protection.outlook.com ([104.47.34.105]:54598 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751464AbdCNOdY (ORCPT ); Tue, 14 Mar 2017 10:33:24 -0400 From: KY Srinivasan To: Dexuan Cui , "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: AQHSnE1NGGkQ92zHZUGuSoOT/Xb6V6GUSjgAgAAci4A= Date: Tue, 14 Mar 2017 14:33:17 +0000 Message-ID: References: <1489445829-15292-1-git-send-email-kys@exchange.microsoft.com> In-Reply-To: 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: [2601:600:8c00:1040:ac43:7d6a:5250:ce1c] x-ms-office365-filtering-correlation-id: 23b7e861-cda3-40e2-293c-08d46ae70e46 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:BN6PR03MB2659; x-microsoft-exchange-diagnostics: 1;BN6PR03MB2659;7:le7JF8ZYfNDDfb3xvSeJk7cgwlrip2DkFP4RTd8l02B2EJrVarqVYZ7yQZ/moGrGG3aPLQgO/+Ixh8UXlIa2rCoFyZNRwlhtryGhWBpop2UtZerSy24pxnQex2pC2oJOvspQt7ipEychlFLB+mROApLYui3Xztv3FmySRQf4ZTsucXMJiLDB7lKXqaOMyWarDvPprcn23djeW8wG6tnQtS7N9o1VT5CbEvtlpTL9JVn04QA3RuzW6ksmB5ZWKD6owUyEk+mYT6GszpDffxmEVA5poMX42TRR92NO9Qeoxba+W+C+uD945QOuKoABkagHOs+bPzVVx5GtgnWCYPYEhg/W/f56lRUYI1LQ49kQUHU= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(140211028294663)(198206253151910); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558025)(20161123555025)(6072148);SRVR:BN6PR03MB2659;BCL:0;PCL:0;RULEID:;SRVR:BN6PR03MB2659; x-forefront-prvs: 02462830BE x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39860400002)(39850400002)(39410400002)(39450400003)(377454003)(13464003)(2201001)(4326008)(305945005)(10290500002)(5005710100001)(86362001)(3660700001)(2501003)(10090500001)(102836003)(53936002)(38730400002)(7736002)(76176999)(54356999)(50986999)(7696004)(106116001)(53546007)(122556002)(77096006)(229853002)(6116002)(6246003)(1511001)(189998001)(74316002)(6506006)(25786008)(5660300001)(3280700002)(55016002)(33656002)(99286003)(2906002)(9686003)(2950100002)(2900100001)(6436002)(8936002)(86612001)(8676002)(2561002)(81166006)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR03MB2659;H:BN6PR03MB2481.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 14:33:17.3379 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2659 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 v2EEYTD7004516 Content-Length: 1584 Lines: 43 > -----Original Message----- > From: Dexuan Cui > Sent: Tuesday, March 14, 2017 5:49 AM > 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 > > > 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? No; this will introduce potential reordering of execution. I am working on rescind handling where, we need to ensure temporal ordering of events until the channel is created. K. Y > > Thanks, > -- Dexuan