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 3DF77A00BE; Thu, 10 Feb 2022 18:01:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26027410E5; Thu, 10 Feb 2022 18:01:38 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id E0DE640140 for ; Thu, 10 Feb 2022 18:01:36 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 907A45C01DE; Thu, 10 Feb 2022 12:01:36 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 10 Feb 2022 12:01:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u256.net; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=bG8fWxXZEeTSTtbMv/kkE6TNPelFnD 4D0dacakjz72I=; b=h45I1By2v3/AIsmyIiDSRhmWtAjrorn0Qfc+uVFIrAa6qy FW0qM+qFhTV7CnGGIYd37u22LzWEkdu8Zz/ZgibboP4cl5PiPF2QWec4Izb2K5Ud n4f9HViI8zGayUD2xhS0JJXPFNnEu8DcKf07juewjTIUlGxJU0zlTXvYjfzohWYz IPvIib9r0A3B7tQp1a4gAnbrr6jv01J6z9fvVJxHrWrxK1Pt9BEA1vSmWSmsgOYt avdpODqb0kFKU0ZeBESJyME/DOIPgrrrkphXE7WxNzufSfp1KXH6ovoy2JNuDG1T h04AQ688Zx346W5716dETftrBiYnW0sI9Sl059tA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bG8fWx XZEeTSTtbMv/kkE6TNPelFnD4D0dacakjz72I=; b=YnE6ESfLZPz4cfgbPt7R2k yJJ9O9Vz/36zMo8WZkqoYjfDv8bQtsancxaUXV5BB7Tfh8mStdQhakAQjf7jMa+d 8LmSN1frz7VjpF7O7uYdlhLmPVxl2AD4J7GK9C1vkU8B0Ge/QUon20lrm0FRoL2C QtBpukEATNOKZuC3i9LRyUrTiXxUC2fiRgUHsKZzU7ZkXEY1OakZ9E9Ln2zJjVOr z4ibFmcG/s6iGo5dmUBO8x1QBGCd+6AGLs8SamNR0Wi8x5WzjZa7bEzQJmBeLKW/ YvUrEyCCFSfUbX9PEk0HsciTJhgzv/u+mZlrqooADxHztn4pgVAcklbLbIekJpPQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedugdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefirggvthgrnhcutfhivhgvthcuoehgrhhivhgvsehuvdehiedr nhgvtheqnecuggftrfgrthhtvghrnhephefgveffkeetheetfeeifedvheelfeejfeehve duteejhfekuedtkeeiuedvteehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepghhrihhvvgesuhdvheeirdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Feb 2022 12:01:35 -0500 (EST) From: Gaetan Rivet To: dev@dpdk.org Cc: madhuker.mythri@oracle.com, ferruh.yigit@intel.com Subject: [PATCH] devargs: Fix rte_devargs_parse uninitialized calls Date: Thu, 10 Feb 2022 18:01:31 +0100 Message-Id: <20220210170131.2199922-1-grive@u256.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220210071052.527-1-madhuker.mythri@oracle.com> References: <20220210071052.527-1-madhuker.mythri@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 function rte_devargs_parse() previously was safe to call with non-initialized devargs structure as parameter. When adding the support for the global device syntax, this assumption was broken. Restore it by forcing memset as part of the call itself. Bugzilla Id: 933 Fixes: b344eb5d941a ("devargs: parse global device syntax") Signed-off-by: Gaetan Rivet --- lib/eal/common/eal_common_devargs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c index 8c7650cf6c..184fe676aa 100644 --- a/lib/eal/common/eal_common_devargs.c +++ b/lib/eal/common/eal_common_devargs.c @@ -191,6 +191,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev) if (da == NULL) return -EINVAL; + memset(da, 0, sizeof(*da)); /* First parse according global device syntax. */ if (rte_devargs_layers_parse(da, dev) == 0) { -- 2.31.1