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 A2F1045DB9 for ; Wed, 27 Nov 2024 18:20:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CA754066C; Wed, 27 Nov 2024 18:20:10 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E041E402DE for ; Wed, 27 Nov 2024 18:20:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GV+qLNT4ntPat5u96zPbKziAl0zKtKkauYy6WQMstNQ=; b=Ztu5cLhmZrttBSUUrmLO/UXCDCTKDHTUZ9DuUDmM+hAz6j3803ljtFV9ioicRIygbOts8u /Y2vBwlE5T/vMKKCwPZUK+djOO+dfb1I2a5zDZhfIsFkI3iDiz4gcNLh+m/k4/AalyE2mR Eh+WxejVj5n8snpCUcjXh5mLdOYpUik= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-AKxVP1GkMzWR5lsB3DFyTQ-1; Wed, 27 Nov 2024 12:20:05 -0500 X-MC-Unique: AKxVP1GkMzWR5lsB3DFyTQ-1 X-Mimecast-MFC-AGG-ID: AKxVP1GkMzWR5lsB3DFyTQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EA6A31955DC3; Wed, 27 Nov 2024 17:20:03 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D9394300019E; Wed, 27 Nov 2024 17:20:01 +0000 (UTC) From: Kevin Traynor 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 21.11.9 Date: Wed, 27 Nov 2024 17:17:22 +0000 Message-ID: <20241127171916.690404-15-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FmuRA10WKEVg5iEESK2GFuDz7wWvQwCSWLTot4T4wdA_1732728004 X-Mimecast-Originator: redhat.com 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 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/de0b999d7b60f5c2d91ece77778eb76cc9962448 Thanks. Kevin --- >From de0b999d7b60f5c2d91ece77778eb76cc9962448 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 cb0427157a..8df09e0cde 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -1496,5 +1496,5 @@ 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; @@ -1505,5 +1505,5 @@ 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; } @@ -1514,5 +1514,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, handler, (void *)arg); if (ret) { - free(intr_efds); + rte_free(intr_efds); return -EINVAL; } @@ -1520,5 +1520,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name); - free(intr_efds); + rte_free(intr_efds); return 0; } -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:38.800743910 +0000 +++ 0015-raw-ifpga-fix-free-function-mismatch-in-interrupt-co.patch 2024-11-27 17:17:38.171269093 +0000 @@ -1 +1 @@ -From d891a597895bb65db42404440660f82092780750 Mon Sep 17 00:00:00 2001 +From de0b999d7b60f5c2d91ece77778eb76cc9962448 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 cb0427157a..8df09e0cde 100644 @@ -31 +32 @@ -@@ -1500,5 +1500,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1496,5 +1496,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -38 +39 @@ -@@ -1509,5 +1509,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1505,5 +1505,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -45 +46 @@ -@@ -1518,5 +1518,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1514,5 +1514,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -52,2 +53,2 @@ -@@ -1524,5 +1524,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, - IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name); +@@ -1520,5 +1520,5 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, + IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);