Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbdH3DtA (ORCPT ); Tue, 29 Aug 2017 23:49:00 -0400 Received: from mail-dm3nam03on0117.outbound.protection.outlook.com ([104.47.41.117]:12352 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751778AbdH3Ds6 (ORCPT ); Tue, 29 Aug 2017 23:48:58 -0400 From: Long Li To: "Martin K. Petersen" CC: KY Srinivasan , Haiyang Zhang , "James E . J . Bottomley" , "devel@linuxdriverproject.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] storvsc: fix memory leak on ring buffer busy Thread-Topic: [PATCH] storvsc: fix memory leak on ring buffer busy Thread-Index: AQHTIGAU1WsdaFaPAkqMtc0j2PVySKKcHp8wgAAmJGA= Date: Wed, 30 Aug 2017 03:48:54 +0000 Message-ID: References: <20170829004359.28526-1-longli@exchange.microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=longli@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-29T20:48:53.6931021-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:c::735] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR21MB0286;6:gYz9ybFtEF4PvAEG+jeOkfP7ZwpbAUqMd3RhipA5zqtPaVynpkPQEl7Iy8ngvM849PwbY7k32NUfv1he3046A1Tgy7SIVtTLZ5y3kE8Kkqz18k39EINJvaJlBUaH4Whwvr0dbnqE66EYo8zcYme8DHsHU+BzTtX7n5N26KVt0bUNRsac4Y41l0wh448ltcOR5dYqQ95OYRbr0YUv9EkF9iAM5hkNvh3n5NStc6+YTyfbN6XDAOqMOlriJToKm6FUkaWoL1vhSSQGFTn9g1ikME90EDm5uwYd/iN8hzZaMW3uP4+i7e7FWvY6kkuxKWVA+TBXnSrDmXh+3SpQ2J0dcQ==;5:fqevuAEXHrMeOc3MX6dVIGAqWzXLA6wG3VU8WqmDNIl1BveY51ZuQCRnc+GcbtBOeQ4AfZc+NJF5m5I1ndKN91f/98ZZBdf/Xls/hSsf5bQVsaZb/gIV1DeemWyzzKAUplSi08K5uia1qMWBjL/47A==;24:Qzocbalg2MNhNKoY8LbkEjj3zrsFKMbpgXSmX/yggixhlQldNsYrkcGyjFN4262uJZu5kMLP2BpeMj4iP2K9W8GsDhGLnoNAzqMCpOhRb8E=;7:3vyYOJ7HMmZGdIj82EMw5w/yGgWdf6OIT65O5z61AHBNoNcUdxjk9N9zr7lV7uXQUqN/YVd075jOztGJPO39Fp3wYW273jN/Cy56Fg0hwCxAytLXkTVu77kytU9Jjie4AHP8o6LsSNjRdNW8+EN7NAFPy0/KqUJxWHbmrDg8uxNaiHteQXCk4aypD0VUz+RbmV7juFnD0Sodhr6hsSMmnvcB/3dumhWflaUV7cxuAG0= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: aa9aa846-3f89-437c-1457-08d4ef5a0979 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR21MB0286; x-ms-traffictypediagnostic: MWHPR21MB0286: authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055)(146099531331640); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR21MB0286;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR21MB0286; x-forefront-prvs: 041517DFAB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(189002)(13464003)(199003)(54906002)(55016002)(478600001)(5660300001)(6246003)(229853002)(53936002)(110136004)(33656002)(10090500001)(99286003)(9686003)(14454004)(68736007)(5005710100001)(8990500004)(53546010)(10290500003)(189998001)(4326008)(7696004)(50986999)(76176999)(54356999)(2900100001)(86362001)(86612001)(77096006)(7736002)(6506006)(305945005)(74316002)(101416001)(2950100002)(2906002)(97736004)(25786009)(8676002)(6916009)(8936002)(81166006)(81156014)(3660700001)(3280700002)(105586002)(106356001)(6116002)(6436002)(102836003);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR21MB0286;H:MWHPR21MB0190.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;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: 30 Aug 2017 03:48:54.9545 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0286 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 nfs id v7U3nHf4008505 Content-Length: 1071 Lines: 30 > -----Original Message----- > From: Martin K. Petersen [mailto:martin.petersen@oracle.com] > Sent: Tuesday, August 29, 2017 6:31 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; James E . J . Bottomley > ; devel@linuxdriverproject.org; linux- > scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Long Li > > Subject: Re: [PATCH] storvsc: fix memory leak on ring buffer busy > > > Long, > > > When storvsc is sending I/O to Hyper-v, it may allocate a bigger > > buffer descriptor for large data payload that can't fit into a > > pre-allocated buffer descriptor. This bigger buffer is freed on return > > path. > > > > If I/O request to Hyper-v fails due to ring buffer busy, the storvsc > > allocated buffer descriptor should also be freed. > > Which kernel version is this patch aimed at? Martin, thanks for pointing this out. This should also go to stable trees. Cc: stable@vger.kernel.org > > -- > Martin K. Petersen Oracle Linux Engineering