From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE2E7A0543 for ; Sat, 5 Nov 2022 18:13:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9EAC40151; Sat, 5 Nov 2022 18:13:34 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id B4903400D5 for ; Sat, 5 Nov 2022 18:13:33 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id p16so4624081wmc.3 for ; Sat, 05 Nov 2022 10:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+/v55ntN6HeG+//b0Uk6aVvfbXytTfwzLNmfcR8kpPc=; b=cnFPySZ3rujaJK++aLxmEj9/c9HV54qO/TfF7743xQhFwwke+RmgKfjkhWfQjFbow8 iZhGNw9tKzDPdOsr10fjZ2v0EVfc5u4PSkrM7Hw//lnw7yiijtmf9dWaIt+dfziWSzZm C7IdfdlWWPQ3NAaqD1vALPmfR+NN7oWXOaDSrdpvNqZ5QcRo3OMtEynOIUPKBOguCvtC F56SjGCqVQ1Bsx2pllvxTtFPz43fqbwXfsCW7mLXY60WhNbKreB0OHndKX1WMMS6I5vs fWEK2GsCB4OUUEEcmEiM11+Zicx8fT1AgPOOsjmKpm724O29HAehCT4dC6p8kKxOFIPS jH8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+/v55ntN6HeG+//b0Uk6aVvfbXytTfwzLNmfcR8kpPc=; b=bRghiz77SBTKmQb7N1ELb9yDBJj6rwYkZ2fCJ2J8eAN/vG5/yilv+qJOxUopAAXVlv wIZvk8Dr30MSFVQQ2LHSTLyd9FIiURgieO7M+WdpQVcC1JXmpprGtIgRhBG11zvF8oi/ bEbKrdqV2ycSyAA2xBhjUyueHTHBRpKzpmaGAaWkpbj368aQO1MMorMZ0KoqRwunrXfa tXIbhpF2G9pCb5LIzv6PByGdIqi+HHSzG83oqGw277jsfegxXPZBvF64RY51YwpYLAtw ODRP8wB2Q1Rqe8Rhg0fL1BjVg5aFJBTvI6tmawHvAPTCM8RtF4C5A3eciJet/zcpUWSg apBg== X-Gm-Message-State: ACrzQf2tZIE/OJ+ONfjjirrAVpyeVqaVeKsW/9MqeHV3I3/rlB6DrHS6 bJVaDr/mH/OhtoNvpKlJwaaPY23lHME= X-Google-Smtp-Source: AMsMyM4D/7W/75R+KqlNqtFaD8+HtASvuYeN5WkyVr2XIBLh7lRi2bPgrp3x5CmnF2jry9k037xtDg== X-Received: by 2002:a05:600c:2c4b:b0:3cf:9cd9:a850 with SMTP id r11-20020a05600c2c4b00b003cf9cd9a850mr4622243wmg.135.1667668413512; Sat, 05 Nov 2022 10:13:33 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id i3-20020a1c5403000000b003a3442f1229sm6564488wmb.29.2022.11.05.10.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 10:13:32 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Jonak Cc: Qi Zhang , dpdk stable Subject: patch 'net/ice: fix null function pointer call' has been queued to stable release 20.11.7 Date: Sat, 5 Nov 2022 17:11:30 +0000 Message-Id: <20221105171146.1520039-31-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221105171146.1520039-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-100-luca.boccassi@gmail.com> <20221105171146.1520039-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/34380524d2de06ed0a0e7592cd7cd295ab85cc09 Thanks. Luca Boccassi --- >From 34380524d2de06ed0a0e7592cd7cd295ab85cc09 Mon Sep 17 00:00:00 2001 From: Tomasz Jonak Date: Wed, 12 Oct 2022 14:27:57 +0200 Subject: [PATCH] net/ice: fix null function pointer call [ upstream commit a8880adcd5f4ea92d0221ff41902d516e68e89ab ] In case rte_eth_dma_zone_reserve fails in ice_tx_queue_setup ice_tx_queue_release is called on 0 allocated but not initialized txq struct. This may happen on ENOMEM condition, size exhaustion of memconfig->memzones array as well as some others. Fixes: edec6dd83824 ("net/ice: remove redundant functions") Signed-off-by: Tomasz Jonak Acked-by: Qi Zhang --- drivers/net/ice/ice_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index fe1f3eea2d..9a7f8ecfe4 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1158,7 +1158,8 @@ ice_rx_queue_release(void *rxq) return; } - q->rx_rel_mbufs(q); + if (q->rx_rel_mbufs != NULL) + q->rx_rel_mbufs(q); rte_free(q->sw_ring); rte_memzone_free(q->mz); rte_free(q); @@ -1356,7 +1357,8 @@ ice_tx_queue_release(void *txq) return; } - q->tx_rel_mbufs(q); + if (q->tx_rel_mbufs != NULL) + q->tx_rel_mbufs(q); rte_free(q->sw_ring); rte_memzone_free(q->mz); rte_free(q); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.407065251 +0000 +++ 0031-net-ice-fix-null-function-pointer-call.patch 2022-11-05 17:11:08.746944187 +0000 @@ -1 +1 @@ -From a8880adcd5f4ea92d0221ff41902d516e68e89ab Mon Sep 17 00:00:00 2001 +From 34380524d2de06ed0a0e7592cd7cd295ab85cc09 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a8880adcd5f4ea92d0221ff41902d516e68e89ab ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 697251c603..953ff217df 100644 +index fe1f3eea2d..9a7f8ecfe4 100644 @@ -25 +26 @@ -@@ -1302,7 +1302,8 @@ ice_rx_queue_release(void *rxq) +@@ -1158,7 +1158,8 @@ ice_rx_queue_release(void *rxq) @@ -35 +36 @@ -@@ -1512,7 +1513,8 @@ ice_tx_queue_release(void *txq) +@@ -1356,7 +1357,8 @@ ice_tx_queue_release(void *txq)