Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1548169img; Tue, 19 Mar 2019 09:58:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6yqPyOBQNG99MQtbDOHodZHAi2e09N/UoAsYj2GSxu0W2Ddb9hCvlXita2CdXpf3QZUe4 X-Received: by 2002:a17:902:681:: with SMTP id 1mr3089656plh.31.1553014737584; Tue, 19 Mar 2019 09:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553014737; cv=none; d=google.com; s=arc-20160816; b=fzyT5BuAMeOf9UE1cOdj9qitTqX9OSWLhYCHIuoQVLZ1F0YHFN5WY6iNHO4fQdxaAo Jbv3SzRS2cukr/HfORp6DS6iAxflTLd25KMF7Or6dbRGscemPI7FXtW0XxPRbB38AUuf CsJTIRgFvr0OpVJVfhLrspxGzHvHrCPPX25uP3HESKweyhGgNuROPbQSH2uSILcJcYpF xCO3iA5kbIrN+9XP0h9R/UjONnoiFJO2Q0Q51Lj6ziDEVEfGiYXCijSqFLqpFZRlGBPw FhqHQWxy/r/r0Rjw3c/nBXJhPEtJ9kT0UOS6wa2Hvo9kDbGCZzIoksgKRWgBhFXQ7qwi UIgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=vI8qnMBpSrEUPQycO4f2/4r1PKRryw3hNNqJvuLgYoE=; b=UsGUW+J47F2ZG7F5dRdoPov0J9LBWKTEO/I/FuudfxUFyhHDmdNemu7W6p7HwJHBtc akpqQ/kXtaH8RNQMulf8l0bV9/xe7cdUEYZ7aZbuUiqO+sLBPuQ4+7F7VLkRO2HFMtRf xLFLF8ngpvbLALh3WjunNLkZnJ1vCOWl3Z+rFBYYwASbq9h8+xyjQhHWat93HOaQhnKO FsoReCyIf4hjVqZwTj0LBg0cgaVpC4H+73a2z6XbjyptwyhH+Z28nbtuShKkPyTHelhX v285y6MCX9eTbjezJsBlngsEMmjBYnPrBkd6AcIIgYPGQhOGjmJVU+7Hk65cDDq+KKu2 mgMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=Edeopl6i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g30si13144831plg.102.2019.03.19.09.58.41; Tue, 19 Mar 2019 09:58:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=Edeopl6i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727466AbfCSQ5z (ORCPT + 99 others); Tue, 19 Mar 2019 12:57:55 -0400 Received: from mail-eopbgr130071.outbound.protection.outlook.com ([40.107.13.71]:65006 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726778AbfCSQ5z (ORCPT ); Tue, 19 Mar 2019 12:57:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vI8qnMBpSrEUPQycO4f2/4r1PKRryw3hNNqJvuLgYoE=; b=Edeopl6ikM0lvKAGdJy7uearu1jonwyge3EEFaAuhDD/j8kMjGHNj6fBf2AydaYmS0S/OOZgSkXt8XSYZ0auMJhFpR9FsdSdtktbNTJMAWf2SzWskHwesJGw8NaLDD8a+mGwr8vGiZyg466qlJzWJkVNfkF3LH0gCQXH3GWZVBI= Received: from DB8PR05MB5898.eurprd05.prod.outlook.com (20.179.9.32) by DB8PR05MB5964.eurprd05.prod.outlook.com (20.179.9.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Tue, 19 Mar 2019 16:57:47 +0000 Received: from DB8PR05MB5898.eurprd05.prod.outlook.com ([fe80::28ed:92cd:4075:b660]) by DB8PR05MB5898.eurprd05.prod.outlook.com ([fe80::28ed:92cd:4075:b660%2]) with mapi id 15.20.1709.015; Tue, 19 Mar 2019 16:57:47 +0000 From: Saeed Mahameed To: "pakki001@umn.edu" CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Boris Pismenny , "weiyongjun1@huawei.com" , "kjlu@umn.edu" , "netdev@vger.kernel.org" , Ilya Lesokhin , "davem@davemloft.net" , "leon@kernel.org" Subject: Re: [PATCH v3] net: mlx5: Add a missing check on idr_find, free buf Thread-Topic: [PATCH v3] net: mlx5: Add a missing check on idr_find, free buf Thread-Index: AQHU3mwu5Tvmra2r5kC9JK5INJWvzaYTLOUA Date: Tue, 19 Mar 2019 16:57:47 +0000 Message-ID: <010498dc10890e09c18ab6941fa2abcde6a7b28e.camel@mellanox.com> References: <20190319155524.6978-1-pakki001@umn.edu> In-Reply-To: <20190319155524.6978-1-pakki001@umn.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.30.5 (3.30.5-1.fc29) x-originating-ip: [73.15.39.150] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 06b277d9-8270-45ef-d8df-08d6ac8c03d8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB8PR05MB5964; x-ms-traffictypediagnostic: DB8PR05MB5964: authentication-results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; x-microsoft-antispam-prvs: x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(396003)(366004)(39860400002)(136003)(199004)(189003)(118296001)(8676002)(26005)(106356001)(68736007)(86362001)(105586002)(229853002)(2171002)(36756003)(186003)(53936002)(486006)(5640700003)(8936002)(6512007)(2351001)(316002)(446003)(2616005)(476003)(11346002)(7736002)(6436002)(256004)(305945005)(71200400001)(71190400001)(81156014)(81166006)(2906002)(54906003)(58126008)(6916009)(14444005)(6116002)(14454004)(5660300002)(478600001)(3846002)(66066001)(97736004)(102836004)(4326008)(6246003)(99286004)(25786009)(6506007)(2501003)(6486002)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR05MB5964;H:DB8PR05MB5898.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SMmyWT3DdN0+dfwMlGlnDKDXBH4vvLcaFtbFIbJTE1ZVwCz8alpNmLFbq4kU4NDDqY9FVDQ9lINA2Mxr6pUaprkVrK97hXcKfPCd8g+lx+r6BP6a3aLsbXDcR9XOn2IJP0+87QGKM3vsxHUu451SnoVNdwxkg+xeQUmgpdxWqEzORXkjLLg58gt9s1LmbXGmG6fH76xrqd/wLCSQc5c48EaiIQe7dy8XUVtuD4Du58co9hwlH5rUeBR2+uIuY6Z9srkLpVJXn0TLfGujcIhFsJNOd/oUgToj86AAFq4Ogaj+2fnHsjt9PflV6tgkpzWhsYILyywpXG0vb7DM/nB1qgNz0Q1ylLqUs+PeH6UtCZfGGEggsGGXqKt5qhIAbHa1DZrcx4ONkc8CZxmRt0acoZBZbOkRThe0HeMNFar/Llk= Content-Type: text/plain; charset="utf-8" Content-ID: <252F3ABE701D5744BFB0FF6E3863C8A9@eurprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06b277d9-8270-45ef-d8df-08d6ac8c03d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2019 16:57:47.7464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR05MB5964 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDE5LTAzLTE5IGF0IDEwOjU1IC0wNTAwLCBBZGl0eWEgUGFra2kgd3JvdGU6DQo+ IGlkcl9maW5kKCkgY2FuIHJldHVybiBhIE5VTEwgdmFsdWUgdG8gJ2Zsb3cnIHdoaWNoIGlzIHVz ZWQgd2l0aG91dCBhDQo+IGNoZWNrLg0KPiBUaGUgcGF0Y2ggYWRkcyBhIGNoZWNrIHRvIGF2b2lk IHBvdGVudGlhbCBOVUxMIHBvaW50ZXIgZGVyZWZlcmVuY2UuDQo+IEluIGNhc2Ugb2YgbWx4NV9m cGdhX3NidV9jb25uX3NlbmRtc2coKSBmYWlsdXJlLCBmcmVlIGJ1ZiBhbGxvY2F0ZWQNCj4gdXNp bmcga3phbGxvYy4NCj4gDQo+IC0tLQ0KPiB2MjogZmFpbHVyZSB0byByZXR1cm4gaW4gY2FzZSBv ZiBmbG93IGZhaWx1cmUuDQo+IHYxOiBGYWlsZWQgdG8gZnJlZSBidWYg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