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 17C7845DB9 for ; Wed, 27 Nov 2024 18:22:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14E3C40A6E; Wed, 27 Nov 2024 18:22:02 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E2DD64066C for ; Wed, 27 Nov 2024 18:21:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728119; 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=Z43WcaHTkF64pTK7rdNtWxJDNw0D4BcoZSYvDiQoEz8=; b=SbUJJXHFqi5ONMDT/ZvG7UiZUOWJZ/2+d3GAoNHqppBYvgj4N2JRWw/Oe5fDg4gEfkSY36 ljS1UQKEALFqRVRN8F2JFdsH9R4IAuMQTHcgtVXtpG5hhJ7DIU28l5wWeoO4SstlITFxuP EA4wXD9sUwD8jahex0I/pJZHfuWaw80= Received: from mx-prod-mc-03.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-311-gGeqe8ZENMK0fsj1JzQY7Q-1; Wed, 27 Nov 2024 12:21:56 -0500 X-MC-Unique: gGeqe8ZENMK0fsj1JzQY7Q-1 X-Mimecast-MFC-AGG-ID: gGeqe8ZENMK0fsj1JzQY7Q 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 64F771955E87; Wed, 27 Nov 2024 17:21:55 +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 366D3300019E; Wed, 27 Nov 2024 17:21:53 +0000 (UTC) From: Kevin Traynor To: Chengwen Feng Cc: dpdk stable Subject: patch 'dmadev: fix potential null pointer access' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:18:15 +0000 Message-ID: <20241127171916.690404-68-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: YT-yy_dmRqr0oJhSoUcb5zhoFg84AdFbE6XZukB_OWo_1732728115 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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/da78f529525d1432c5a2e7dc77d86b64a94bab1e Thanks. Kevin --- >From da78f529525d1432c5a2e7dc77d86b64a94bab1e Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Sat, 12 Oct 2024 17:17:34 +0800 Subject: [PATCH] dmadev: fix potential null pointer access [ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer access is triggered. This patch adds the null pointer checker. Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use") Signed-off-by: Chengwen Feng --- lib/dmadev/rte_dmadev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index 4e2057d301..8b5c3934d4 100644 --- a/lib/dmadev/rte_dmadev.c +++ b/lib/dmadev/rte_dmadev.c @@ -707,5 +707,5 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * struct rte_dma_dev *dev = &rte_dma_devices[dev_id]; - if (!rte_dma_is_valid(dev_id)) + if (!rte_dma_is_valid(dev_id) || status == NULL) return -EINVAL; -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:40.407178737 +0000 +++ 0068-dmadev-fix-potential-null-pointer-access.patch 2024-11-27 17:17:38.261269560 +0000 @@ -1 +1 @@ -From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001 +From da78f529525d1432c5a2e7dc77d86b64a94bab1e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 845727210f..60c3d8ebf6 100644 +index 4e2057d301..8b5c3934d4 100644 @@ -22 +23 @@ -@@ -742,5 +742,5 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * +@@ -707,5 +707,5 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *