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 E978A41DB5; Thu, 2 Mar 2023 08:56:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1F2942B8B; Thu, 2 Mar 2023 08:56:34 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 071B441153 for ; Thu, 2 Mar 2023 08:56:32 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PS3Lt2mQMzrS1R; Thu, 2 Mar 2023 15:55:50 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 2 Mar 2023 15:56:30 +0800 From: Chengwen Feng To: , CC: Subject: [PATCH 0/9] fix kvargs callback prototype not clearly defined Date: Thu, 2 Mar 2023 07:50:03 +0000 Message-ID: <20230302075012.32423-1-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The rte_kvargs_process() was used to parse KV pairs, it also supports to parse 'only keys' (e.g. socket_id) type. And the callback function parameter 'value' is NULL when parsed 'only keys'. But where there is no detailed definition of 'value' maybe NULL. this leads to a lot of processing errors (some may cause segment errors). This patchset fixes some of them. Chengwen Feng (9): kvargs: detailed definition of callback prototype compressdev: fix segment fault when parse input args compressdev: fix null name when parse input args cryptodev: fix segment fault when parse input args cryptodev: fix null name when parse input args net/hns3: fix segment fault when parse runtime config net/virtio: fix segment fault when parse devargs dma/skeleton: fix segment fault when parse devargs raw/skeleton: fix segment fault when parse devargs drivers/dma/skeleton/skeleton_dmadev.c | 8 +++++++- drivers/net/hns3/hns3_common.c | 9 +++++++++ drivers/net/virtio/virtio_ethdev.c | 3 +++ drivers/net/virtio/virtio_pci_ethdev.c | 3 +++ drivers/raw/skeleton/skeleton_rawdev.c | 2 ++ lib/compressdev/rte_compressdev_pmd.c | 6 ++++++ lib/cryptodev/cryptodev_pmd.c | 7 +++++++ lib/kvargs/rte_kvargs.h | 14 +++++++++++++- 8 files changed, 50 insertions(+), 2 deletions(-) -- 2.17.1