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 9A8FEA0547 for ; Tue, 9 Feb 2021 11:37:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 936F5160715; Tue, 9 Feb 2021 11:37:03 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 0E99A16070A for ; Tue, 9 Feb 2021 11:37:02 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id u14so21029081wri.3 for ; Tue, 09 Feb 2021 02:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nU8VpMBP57o+jhwn+ZKsILiSLh5MEWJfaDZD1RCq58Y=; b=UMT5blmeLoazIA42v00SKG7ntOH7gQOmp7hytsuLwuacEkTJEiSxXSYGaWJ5av1JVA GzqsUsn2soRTQ3n5ttQ4RnDOllDPci6AZcwSbZbU1Z7vKRIk32U0oTYWade1I5o9/rXb AXwbsdfFUYX2aoySOIeQOohyFnHOM28Fe5j400TDx9tyWqFLd4+JbIjMaRtYt1MbLw6/ 6tKOWST9AK5Ozf8Q5m8ucj3Lp/ASlHd0pGK5OZ/IM50bksNhChd9Me3IdYKAkLqfrqpJ 4TmbBejp4F+92TFJZYlUauQ4iDkADQpC5EVsFKCrcVYzU5p/YsqObEzyHE/kCgW5vdKX 3SUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nU8VpMBP57o+jhwn+ZKsILiSLh5MEWJfaDZD1RCq58Y=; b=t9caA8t3zvNDaVNDzmoiHE39o4Wv9rftxryeePRmBU7Qzaq/U9dw0peHXmAVrl9tVy O7ezzgFfozgWJ0wZmdnIeWJeCbQlzzFzXkxhkdvcA/8uIGxwZWfUEdc4nL4F7BjVyIYs 0mNR9EfJL/IXoVlfHEURZi7sjY0/rth/Jf/BhXthyVmZ+M5VTit35D7v67C8OJevfZ9n s53FeH0Aiw9YAyTAtymLEtQIZpf8mVNZcVg8NWmSUHVhBuJlcn/OtMjJ1BIcti8QW1mn 4x431sQL+yslllN47BxJp0dVWdVbM1PpsUIihLnsqMDeFzG6Jb0oiA09OoB9I79bqGwa /xPQ== X-Gm-Message-State: AOAM5328LkmBjsewPOqwBYkIKIuNT64FO8Drr2Dmid2PDTlKhnNBHLYT Ee3DFmplmhiUsPOW8Y07iZme5Lb1YpE2Fxj4 X-Google-Smtp-Source: ABdhPJyJ4oeAPxN3cYBfEMYGtpnU2gGtskZ2gKzG6mSxabidoNc7lG6Io56WsikTWgFZVBDHE1Gv6g== X-Received: by 2002:adf:c40a:: with SMTP id v10mr11119078wrf.10.1612867021820; Tue, 09 Feb 2021 02:37:01 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r17sm35062721wro.46.2021.02.09.02.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:37:01 -0800 (PST) From: luca.boccassi@gmail.com To: Olivier Matz Cc: Andrew Rybchenko , dpdk stable Date: Tue, 9 Feb 2021 10:35:28 +0000 Message-Id: <20210209103529.466775-30-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103529.466775-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210209103529.466775-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'mempool: fix panic on dump or audit' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/11/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/e00dcbea06d811e39d719c6e193208f3eca245e9 Thanks. Luca Boccassi --- >From e00dcbea06d811e39d719c6e193208f3eca245e9 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Wed, 3 Feb 2021 10:01:01 +0100 Subject: [PATCH] mempool: fix panic on dump or audit [ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ] When doing a mempool dump or an audit, the application can panic because the length of the cache is greater than the flush threshold, which is seen as a fatal error. But this can temporarily happen when the mempool is in use. Fix the panic condition to abort only when the cache length is greater than the array. Fixes: ea5dd2744b90 ("mempool: cache optimisations") Signed-off-by: Olivier Matz Acked-by: Andrew Rybchenko --- lib/librte_mempool/rte_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index b9f3fbd614..afb1239c8d 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -1167,7 +1167,7 @@ mempool_audit_cache(const struct rte_mempool *mp) for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { const struct rte_mempool_cache *cache; cache = &mp->local_cache[lcore_id]; - if (cache->len > cache->flushthresh) { + if (cache->len > RTE_DIM(cache->objs)) { RTE_LOG(CRIT, MEMPOOL, "badness on cache[%u]\n", lcore_id); rte_panic("MEMPOOL: invalid cache len\n"); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-09 10:34:59.107686782 +0000 +++ 0030-mempool-fix-panic-on-dump-or-audit.patch 2021-02-09 10:34:57.946584700 +0000 @@ -1 +1 @@ -From daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 Mon Sep 17 00:00:00 2001 +From e00dcbea06d811e39d719c6e193208f3eca245e9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org