From patchwork Thu Jan 26 01:02:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Fedorenko X-Patchwork-Id: 13116477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E0ABC54E94 for ; Thu, 26 Jan 2023 01:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236471AbjAZBC1 (ORCPT ); Wed, 25 Jan 2023 20:02:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236391AbjAZBC0 (ORCPT ); Wed, 25 Jan 2023 20:02:26 -0500 Received: from novek.ru (unknown [213.148.174.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AC365CFF6 for ; Wed, 25 Jan 2023 17:02:23 -0800 (PST) Received: from nat1.ooonet.ru (gw.zelenaya.net [91.207.137.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by novek.ru (Postfix) with ESMTPSA id F010A50453C; Thu, 26 Jan 2023 03:56:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 novek.ru F010A50453C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=novek.ru; s=mail; t=1674694619; bh=6b9j39uEVOxkTQZhu0hEE8TAeetpFBH6OF5858c8Kfg=; h=From:To:Cc:Subject:Date:From; b=KWXZ/7rRdcDhHK6WoCLzb1R5mP0i+8R3qnqFG/tpjr8gfuORDPCsFTDERM3qJym/V 2JlBxXYaWDp6x780BdUYGOqNfHfVmJJNUurwiaGJwg1weQMe543w71Ym0EUibDc/jZ 8f/rofJ1MRTGA42KTmpPYNmfZ/5gyGiIw0+RxOBE= From: Vadim Fedorenko To: Vadim Fedorenko , Aya Levin , Saeed Mahameed , Jakub Kicinski , Gal Pressman Cc: Vadim Fedorenko , netdev@vger.kernel.org Subject: [PATCH net v3 0/2] mlx5: ptp fifo bugfixes Date: Thu, 26 Jan 2023 04:02:04 +0300 Message-Id: <20230126010206.13483-1-vfedorenko@novek.ru> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadim Fedorenko Simple FIFO implementation for PTP queue has several bugs which lead to use-after-free and skb leaks. This series fixes the issues and adds new checks for this FIFO implementation to uncover the same problems in future. v2 -> v3: Rearrange patches order and rephrase commit messages Remove counters as Gal confirmed FW bug, use KERN_ERR message instead Provide proper budget to napi_consume_skb as Jakub suggested v1 -> v2: Update Fixes tag to proper commit. Change debug line to avoid double print of function name Vadim Fedorenko (2): mlx5: fix skb leak while fifo resync and push mlx5: fix possible ptp queue fifo use-after-free .../net/ethernet/mellanox/mlx5/core/en/ptp.c | 25 ++++++++++++++----- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 9 +++++-- 2 files changed, 26 insertions(+), 8 deletions(-)