From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3AA27A320B for ; Mon, 21 Oct 2019 14:04:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 18B781BEEE; Mon, 21 Oct 2019 14:04:46 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50061.outbound.protection.outlook.com [40.107.5.61]) by dpdk.org (Postfix) with ESMTP id 1733A3237; Mon, 21 Oct 2019 14:04:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PZW0shI1fD4vV689SxuytpByFE5UAxejoMsNSXTm7wEJB4hlHmgTbKn3SZ03n8N57SNXJFk5m+4EwY8t4UNwx1PSIn/i2qgh/iBgD/vuc9Lw7UAoRQT1Fo0DanxeNt7Dihr56khSi+do8Xlvj/YmjAgRrhf/zhmVBNgEEk/VkuQnzkkY0ni46JuRpS+CgBxLQbZJbY0TAH0xqUUQK/d+0jThdC+icW/7T+5MKgYgSN71S+kRszbTe2qdjtE8O3MHx/zKzwE9xgNiXMV//++LTWSocnH2jZOCHEnzvQ7fuT2vboO5L2sVUe6+3wlstAZ/XiD0ZMZIfJNKdT2FMSau4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sEo2ZnyzjMa9D2bYwfCe9whcx5opzqpVvi43ZQIr334=; b=jq/H9++ZHqRNW3flAhkO9YtM3dq7uGjqpJtMUCgg9h4Nxk5mmymzl4HLIXMdFTtw+FY6DxWm0B1/MT0rFUjnsrzA5mGACH4P1jWzQbZqVN8sqiKMBINl9vgD1NsPBJ9DRI5nZvTE8Vje/o4wrfLBE5xAe+hyzZoXvydFmGdCQ79S6LHiUnpTZos9Xz2bm9bURTFi835l5nP9Vtzeuqj0Sa/5sr+etvavcOlbXmqITKWigINB4YVd8dqj8mRkLj5UBscvTwAasquRLCw2Hd03M0zbfkiyMxQu50rXDa8RIDFSJWcRp6JT/RjO8EhR4mSRue+GzsKWOSBjeLHLtIAzGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sEo2ZnyzjMa9D2bYwfCe9whcx5opzqpVvi43ZQIr334=; b=ox9IYNFwEZNynCkXsxTcgr5buLncaonB20tRsrE8Gl43b0ocSuJ8+hfOeH+JVcdK0diSrIldNP77gUI9VO8r0yCMS4yGFqvIDpVc1RdQhe+yQh3MO4sBNiUxq7kyRxijM8f1YfGKJrlxvKCzmarDZnVRvio24gCu8OsCkMRFKGo= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB3977.eurprd05.prod.outlook.com (52.134.70.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Mon, 21 Oct 2019 12:04:39 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::1528:69ed:ffec:764b]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::1528:69ed:ffec:764b%5]) with mapi id 15.20.2347.028; Mon, 21 Oct 2019 12:04:39 +0000 From: Raslan Darawsheh To: Jack Min , Shahaf Shuler , Yongseok Koh CC: "dev@dpdk.org" , "stable@dpdk.org" , Zengmo Gao Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix segfault when create hash rxq of drop Thread-Index: AQHVhNig3TDUlgAnR02l2K9YcEnHCqdlBZ/Q Date: Mon, 21 Oct 2019 12:04:39 +0000 Message-ID: References: <5457ba5f9334191a03696e630fde2ddbe31ad879.1571305289.git.jackmin@mellanox.com> In-Reply-To: <5457ba5f9334191a03696e630fde2ddbe31ad879.1571305289.git.jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 776934e8-707b-47d8-602c-08d7561ed9ce x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: DB3PR0502MB3977:|DB3PR0502MB3977: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0197AFBD92 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(376002)(366004)(136003)(346002)(396003)(189003)(199004)(13464003)(76176011)(66446008)(64756008)(7736002)(110136005)(305945005)(66476007)(66556008)(256004)(25786009)(102836004)(7696005)(74316002)(14444005)(66946007)(316002)(229853002)(55016002)(99286004)(6436002)(54906003)(2906002)(76116006)(6506007)(486006)(4326008)(81156014)(86362001)(14454004)(66066001)(446003)(6116002)(3846002)(11346002)(5660300002)(81166006)(478600001)(6246003)(33656002)(71190400001)(71200400001)(26005)(6636002)(476003)(52536014)(186003)(9686003)(53546011)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3977; H:DB3PR0502MB3964.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8+IFkOGU3StcScw93LXn3IT/ewg/KheDczG4qUpsvmqkjXK6pJH5gBk75y+K2PiXG3YjB9RG+3eDZ9kZYTb4s/wn1slA5Rkzw1jDIIzQWxYvD6+UdHB9+ImsR3tuHFw+Sjd1NeJwIA8juf4gXD3gEiF7PS6vHUViIPOcHMEfkRjqthLqDRddLSFQMLwwJ4f3a75jdlhwbi0AHbMlM6dRnm2ZfcAYXbBkLYKobPEJiKWIqzE3qA6Qv5AVVbknnzxjKZxvcyT75pDrOuThxITNLxGT0PFAW17HQnDthQjyv5WXO2NmZwtR57T5i9CeiKlRW9uvpbp2ytGarrkrZZrcVwm1FZNS9CPN0IDMv0XCT4VDX/Z0SksA6nywX6zB2WhjHLyHdDDs9rtopDXXj8Xadu37ON46kFRI0pxk5di40FQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 776934e8-707b-47d8-602c-08d7561ed9ce X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2019 12:04:39.8783 (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-CrossTenant-userprincipalname: 2I9L54Q6AtwOxd8k+0w3j3kLwsJxGAUQSscgMd6Fr+PD2mPFlxMQWE8RZWxzEyCD53uAj93ucc2bJLSxSvjHqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3977 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: fix segfault when create hash rxq of drop X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, > -----Original Message----- > From: dev On Behalf Of Xiaoyu Min > Sent: Thursday, October 17, 2019 1:50 PM > To: Shahaf Shuler ; Yongseok Koh > > Cc: dev@dpdk.org; stable@dpdk.org; Zengmo Gao > Subject: [dpdk-dev] [PATCH] net/mlx5: fix segfault when create hash rxq o= f > drop >=20 > When to create hrxq for the drop, it could fail on creating qp and goto t= he > error handle which will release created ind_table by calling drop release > function, which takes rte_ethdev as the only parameter and uses the > priv->drop_queue.hrxq as input to release. >=20 > Unfortunately, at this point, the hrxq is not allocated and > priv->drop_queue.hrxq is still NULL, which leads to a segfault. >=20 > This patch fixes the above by allocating the hrxq at first place and when= the > error happens, hrxq is released as the last one. >=20 > This patch also release other allocated resources by the correct order, w= hich > is missing previously. >=20 > Fixes: 78be885295b8 ("net/mlx5: handle drop queues as regular queues") > Cc: stable@dpdk.org >=20 > Reported-by: Zengmo Gao > Signed-off-by: Xiaoyu Min > --- Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh