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 886F845BB6 for ; Wed, 23 Oct 2024 23:18:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82E9B40261; Wed, 23 Oct 2024 23:18:07 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 8804543281 for ; Wed, 23 Oct 2024 23:18:06 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so2010055e9.3 for ; Wed, 23 Oct 2024 14:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718286; x=1730323086; darn=dpdk.org; 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=uO34QvHFId/nQKyzztQ05Qwb/UwHB8dStDwdWuD2BLw=; b=eURlbJH7/5A4lU0Reh2lEIx7FddqNMN19Lgsjow1Mwx/xtpWBXodlT3eHzjo1fIIs7 XLCAd8EWKwzifec73tX4Fn8Dbqaua7dwnu+wiJMKCy77AfqLXBmCi/ftkesIBeOBNtb/ Jf5TLY16sGV87k+sLqWOwJIJc1JApR0wGZbk99aBy1/MTbLyu9Sh20mpzZFvnRfjEZxs ie1Y6xAT+YeXGM6fVStmVJlH7xAzEz/qdoEfaiLsJxIoukVk1z4ZzKt0v3x1hqdEA2Md fgNLdIBYMAD/fbUmp8V99Rh0CdsvVk0Yp3uvlLe9tMPk1c3mBGa5RYWlF60hauDAhzWF 1Hqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718286; x=1730323086; 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=uO34QvHFId/nQKyzztQ05Qwb/UwHB8dStDwdWuD2BLw=; b=M5C7+9B1hOWZ+Stj7NkgaTn+hxUFX5Sm8KB3ETcPopBimDvCSRcQy/Wai5gGitkgJn SoFrp0GnupkUgqhfvOrz2SZQzItJfshitKiW78c3BvNGG8JmKpboiK2OWN6/q8cTc65t HsVX6iwZRqqsiotc7M5d9DLXamRlvhqwRvCZVqUhzMIBGh5rNPX/+e1nxNUJMpXkzwQ7 Kwzr/EbWrp8epmgbZTWBZUkN/4uth3gXff8g/EuNFEokg37XNHfVnUhA4W6+iRmqOwEd a2R9AHs0GpV8UT4yfSEK6BLpJ65Wr6hpgqd+JlM0SxFxGohz2P1BRNW5sBoOd7wIMfCI au9g== X-Forwarded-Encrypted: i=1; AJvYcCXMzedpJQGyYBFQlG8T4eINb0tU05sPClVBtowxfjB/RUcDVanbS6/dLWGHMeGolqBzVx7OyH4=@dpdk.org X-Gm-Message-State: AOJu0Yz1L2Cn+mZNh0PeKYRoGgIDeyh7YgyWhsFWM3DD8pAIWWLmK10t qnsOPb6nQSOlV1e/Du2rO+9r+ppvMpY6NRixf+xc8QXgjqkiZMe4 X-Google-Smtp-Source: AGHT+IHOrSdUO2yUezzaCYxSUi5cmC4+OH0cqk4auRU5K5RuiJoDrJ5TdXiq32Cj1LrkSt8VdbfDlA== X-Received: by 2002:a05:600c:354f:b0:431:6083:cd2a with SMTP id 5b1f17b1804b1-431842074e4mr31696115e9.15.1729718285992; Wed, 23 Oct 2024 14:18:05 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c508ddsm26939075e9.40.2024.10.23.14.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:18:05 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'raw/ifpga: fix free function mismatch in interrupt config' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:15:57 +0100 Message-ID: <20241023211704.1216956-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 22.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 10/25/24. 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/8a8601623860ef67574e8bce04429c48a9978abf Thanks. Luca Boccassi --- >From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:18 -0700 Subject: [PATCH] raw/ifpga: fix free function mismatch in interrupt config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit d891a597895bb65db42404440660f82092780750 ] The raw ifpga driver redefines malloc to be opae_malloc and free to be opae_free; which is a bad idea. This leads to case where interrupt efd array is allocated with calloc() and then passed to rte_free. The workaround is to allocate the array with rte_calloc() instead. Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/raw/ifpga/ifpga_rawdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index 1020adcf6e..aa5d8b1a43 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, nb_intr = rte_intr_nb_intr_get(*intr_handle); - intr_efds = calloc(nb_intr, sizeof(int)); + intr_efds = rte_calloc("ifpga_efds", nb_intr, sizeof(int), 0); if (!intr_efds) return -ENOMEM; @@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, ret = opae_acc_set_irq(acc, vec_start, count, intr_efds); if (ret) { - free(intr_efds); + rte_free(intr_efds); return -EINVAL; } } @@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, ret = rte_intr_callback_register(*intr_handle, handler, (void *)arg); if (ret) { - free(intr_efds); + rte_free(intr_efds); return -EINVAL; } IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name); - free(intr_efds); + rte_free(intr_efds); return 0; } -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.198059968 +0100 +++ 0017-raw-ifpga-fix-free-function-mismatch-in-interrupt-co.patch 2024-10-23 22:16:40.451940874 +0100 @@ -1 +1 @@ -From d891a597895bb65db42404440660f82092780750 Mon Sep 17 00:00:00 2001 +From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit d891a597895bb65db42404440660f82092780750 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 113a22b0a7..5b9b596435 100644 +index 1020adcf6e..aa5d8b1a43 100644 @@ -31 +32 @@ -@@ -1499,7 +1499,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -40 +41 @@ -@@ -1508,7 +1508,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -49 +50 @@ -@@ -1517,13 +1517,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -58 +59 @@ - IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name); + IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);