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 E3EA2A00BE; Wed, 6 May 2020 08:25:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BDDB1D6E0; Wed, 6 May 2020 08:25:27 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60056.outbound.protection.outlook.com [40.107.6.56]) by dpdk.org (Postfix) with ESMTP id D7DC31D6DF; Wed, 6 May 2020 08:25:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VApb1kqbwIDOMgui/4npfbvg/1VAJcrK/PR5PR3L6Q/xmBbGW8cCBggL9DpIZY64DE6CWEtpnPetzYvku3Ex66WhNwyEPE+Y1FHqJsDSw/Bzs56bRAeWycUU7TtHSZdd8CIngjF15K3bkd6PA/OLErz06jgK0niNAywvwVZNkU65sQ9ThfCeNJB5V47ZdkwPFktiKK4dtbO5tWPZqXi+VggwC87dON8Chf2bvLiu7C2E0DJulhOxJol816zEg679k+1IAmYHgFifjj1hwYUahPwam6KPlK/gLZzThc/umKSUaL2/tQUyhGcqkWcE1Hr/d9uKTcb2YwwC+NZOFpXIHA== 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=GqI4f08P4gs8gnpTGkrBKlTCWd9l5FhFIsyQRErlS64=; b=ejsDtWxL0Sl5Cq2H6hnsYj2jWnk0B/LhyCUoqLGvdXp+QWEt69hheCglm0tKrBCseqzVriLW2TzbGSCWh4XhtXC/zxgzlMxvBDeBxDqzpE1ASftQ9DToraFJHPdc8i6h7/DazBc2Nms/hRQxcGN2ojK9WFYsXOzst5GwPbq2v7MV4lUfO+PKVkWcchDNYKKOVp29bj89Ka8kvcf/H72IEFMGX0YKc3tzfzNWVKcw3Ue2YTGFdKgBdUhIctkacpmKQtWxvzXHe8oR6MGghdqu4tmN1/FLfLrQksSq1tPwJM8CKTLVgRdsYcu9jR7eiLKFZqyP2YhPN7ZGQzPOKv3PEg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GqI4f08P4gs8gnpTGkrBKlTCWd9l5FhFIsyQRErlS64=; b=mAcV5zoHzZ7lGGL8s3ZYS9kMNXCrSgdkrGQd5JipMxYaNK/YMLYdc22XrjMd5x9C3YgQIRdFnjWW2Fcnj4636LBbKRPAMkBAT3VzwonoLPsgrCxf06+we1LBEeWgrrroLCpQ8Un+on/qzH0xtXW+v0b4hss3Tz512CkLvrO5M2E= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (2603:10a6:208:f::11) by AM0PR0502MB3874.eurprd05.prod.outlook.com (2603:10a6:208:1a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.21; Wed, 6 May 2020 06:25:24 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::a564:a117:9022:1fee]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::a564:a117:9022:1fee%7]) with mapi id 15.20.2958.030; Wed, 6 May 2020 06:25:24 +0000 From: Matan Azrad To: Alexander Kozyrev , "dev@dpdk.org" CC: "stable@dpdk.org" , Raslan Darawsheh , Slava Ovsiienko Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix debug log segfault on TxQ release Thread-Index: AQHWIxYRor3iCUmmwUWNGuSUaP9vxaialm5Q Date: Wed, 6 May 2020 06:25:23 +0000 Message-ID: References: <1588708066-18165-1-git-send-email-akozyrev@mellanox.com> In-Reply-To: <1588708066-18165-1-git-send-email-akozyrev@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [77.126.88.104] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f7a1dd86-ed4c-4a06-9599-08d7f1864288 x-ms-traffictypediagnostic: AM0PR0502MB3874:|AM0PR0502MB3874: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 03950F25EC x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +sNWcb9pqk1Q+67p6Z9Ak03diGWw0eMWvBI7Akf3n4QogikD1TVnCRya08Ij3xwss1DHn7uQRGFsE6O0/xCMQZseLqtNRFTWwZ/EpjpQTqKOqIyW0OWdaLN40FRStb4+WF/kOd0DC8umIivvOWQR017SbNYLYSdmIZyNd/MNFb8wst1dSZmTTywLyRM1OcD531NKIKuGd1yt2IJwBqNklFF1GTIHtEEKTAumzNWW8riIpcWrHt0G+8r6hIKaxpQiCkZFJAuvMBcyDpB+oZxSBzeBVnmJC/fgJbGqyrkN9BhuNPYcKi5/Rc/sfAPQUCZj+c3fqIj8BpZTOBtPSPhc0CUC1d7qefA1oWgwarrzrbShzi9EOdaeQhk7HReol95vxBw1WGo9iZFD2jpIVgsq8stmcr5bEF9lKfs+VxHL6u6f5VA/Ff4A6h+0Ei3G72Y2d8Btmrl4UVGAeeiWIGfRzGVhBOFqNp9spJT21toZ9Gazjpg1nFnF17/BNtmC2YVDUFvipO4ftlLDS9qgLibJ+A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(376002)(346002)(39860400002)(396003)(136003)(33430700001)(55016002)(9686003)(316002)(110136005)(450100002)(8936002)(4326008)(33440700001)(478600001)(8676002)(107886003)(33656002)(7696005)(2906002)(52536014)(5660300002)(86362001)(54906003)(66446008)(66556008)(66946007)(6506007)(76116006)(64756008)(186003)(66476007)(71200400001)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: W4IY1b+FrMTz7Ylxl6gNa8xGxqgcx6qS8gyIHDReZ3KAUT5W2iCVCboq8nanm7QBFKeBjHHcgd0hN+NcAWoW5aGflDRbgnRQ1MJwY9Z7ErdA3l4lvf6LGS+TVTLbBDgRsfAis4SnbMircQufCwHluywIM9LfqFnRWwwFI3YYczBitB/6AzmFtHUODKUUOJVDwHhNOeMjH4zMgqU58YT0i49J07m+TDlK0qkCF6lqWX1cnIYwOBYTptj/10KZMrgDMVC5uBPrjQuJ1O2kJebWD7Hw/YHM9JfKc22YOiXmH0G5koodQ+8ITMV+xWuORLZo4XuUe97F1JZgwkaIq4eTAUH2C3tpscL3IPY/mfrxJ8XOILPinEUhGoujyPD9HIzUXb9t1/iUjoedlC/1UWXFT68Q17JmmBkusn2j03tV1B2vMLAO9fociy0GNJ+NfKG1lKq8ufNujw3/kQPfsBuFpJUMXtirN2/3Jnq0nB181ldcp6lab3CCqzRG5rF+mpTnj4vdhr+SImoWnHYtCsxPAGIpbds3VlF1T6yfZuGguw8BXmquNX1BGPvSdJ2Ff7bDXjs9wLi/DE17F5Omcwam4Qxapn3CKEnbyi5hIQ/PUIrQV87ryv9S0vppTF9SsNm0uCHeF3cHKn0IPaazwqOpt9Fty/WShHxpQ9o9R1BefNnBjoC6vUZuJbfH08HPG+09LBhO1xaZRD/4lUwnzdLuDEK7KhwOCtJKtCZ+gsVeAcxxUUVYjHEcKuJxQMLqPsTMQLiqu7uhRkDLwJA8HdgaHDOnqcDa05HMSm++wlJ+dPE= 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: f7a1dd86-ed4c-4a06-9599-08d7f1864288 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 May 2020 06:25:23.9295 (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: lW844s4MiDCkiokTm4gkSC3acTqgFp8Crr96kD5jaYqLxBJrdyX7F4lC5KnaQADD6SsIzlqynYeOPOHCzqQM6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3874 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix debug log segfault on TxQ release X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Alexander Kozyrev > Program received signal SIGSEGV, Segmentation fault. > 0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=3D0x17ce01680) at > drivers/net/mlx5/mlx5_txq.c:302 > 301 mlx5_txq_release(ETH_DEV(priv), i); > 302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list", > 303 PORT_ID(priv), txq->idx); > The problem is txq is freed inside the mlx5_txq_release() function and no > longer valid in the debug log right after this invocation. > Move the debug log before the mlx5_txq_release() function to fix this. >=20 > Fixes: a6d83b6a92 ("net/mlx5: standardize on negative errno values") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alexander Kozyrev Good catch. Better title: net/mlx5: fix TxQ release debug log timing In general, we prefer that the fix title points to the root cause and not t= o the consequences. Besides it, Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5_txq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index 29e5cab..a211fa9 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -298,9 +298,9 @@ > priv =3D txq_ctrl->priv; > for (i =3D 0; (i !=3D priv->txqs_n); ++i) > if ((*priv->txqs)[i] =3D=3D txq) { > - mlx5_txq_release(ETH_DEV(priv), i); > DRV_LOG(DEBUG, "port %u removing Tx queue %u > from list", > PORT_ID(priv), txq->idx); > + mlx5_txq_release(ETH_DEV(priv), i); > break; > } > } > -- > 1.8.3.1