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 5948545459 for ; Wed, 19 Jun 2024 22:16:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 516F3402C6; Wed, 19 Jun 2024 22:16:23 +0200 (CEST) Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) by mails.dpdk.org (Postfix) with ESMTP id 95904402B8; Wed, 19 Jun 2024 22:16:22 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 25B9711400F9; Wed, 19 Jun 2024 16:16:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 19 Jun 2024 16:16:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1718828182; x=1718914582; bh=g7dz+0ecSIWWca87h5iE4kbllHWSsRepSmZ4LgbfSYs=; b= UrlEkm3+321zlWcsr8tH1tgz1UDuwvhaLA9aN2iEgjRct3YwSbV+adGyWuBUYsIl VkbFQB+SkAiFe+qIbU2bcXJLx2H71Tg5dT7jQ/vL8BVtnLupqGnwnGxKPYsZrPeQ mwVsR7Fbuk9cB/Rw8GBgTswuxtEHe7Qbgwby2hOnpeODUae8HvByrCQ87iyhvlis CIarazvHLxLo8xP6GUM5/mm+cwdW8PDPOKjdohohXas2aH0HAK5HGTUYA1ANd8B7 rMfIfihBokcOAMbchnmBK8cMnGYDMrSh08B0nm2kgINgPvM5ZXT2mctyuZ7t+7gj Zxx45+3Sl0RiLlnMCgyJIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718828182; x= 1718914582; bh=g7dz+0ecSIWWca87h5iE4kbllHWSsRepSmZ4LgbfSYs=; b=m jR3juCIhOVayZu6MAswhtzzoVFMgF2wo1VCoaEiU811gIPLdxVxE7Gd0hEOm964c 9pHMKRGYL73XZKkAGwC4QUlGlyOUQOrsQcbl/AhOkMgbeGr8saJvz4KpDP2oQgaQ 4sMWpHUb6SBMgLHEA7WxRPk1HQLzQdKd9YpxoqLB1nRHxqy4/6r+N3rXFcVDfDi2 Bstfo4ek8prKxWfNh6tmd0skNBqe9ZmJuv2wuO0GfurpWD8q5rAqelNIghuHY3kh uqyLmXApPrdBVtPvvzaDeI4mnDcGTDRjv8qUf3dQ/AFVUQMrkb4hAXvlQ1Na8gk5 I9PW+hJFRvT9uLBC0dcQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkjghfggfgtgesth furedttddtjeenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgr shesmhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeejudevheeiveduud dtveffgfdtgeekueevjeffjeegtdeggeekgfdvuefgfeekjeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghloh hnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 16:16:20 -0400 (EDT) From: Thomas Monjalon To: Mingjin Ye Cc: dev@dpdk.org, stable@dpdk.org, david.marchand@redhat.com, stephen@networkplumber.org, bruce.richardson@intel.com Subject: Re: [PATCH 3/3] net/vdev: fix insert vdev core dump Date: Wed, 19 Jun 2024 22:16:19 +0200 Message-ID: <6769551.vcMjziH8VY@thomas> In-Reply-To: <20240314093630.1066948-4-mingjinx.ye@intel.com> References: <20240314093630.1066948-1-mingjinx.ye@intel.com> <20240314093630.1066948-4-mingjinx.ye@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 14/03/2024 10:36, Mingjin Ye: > Inserting a vdev device when the device arguments are already stored > in devargs_list, the rte_devargs_insert function replaces the supplied > new devargs with the found devargs and frees the new devargs. As a > result, the use of free devargs results in a core dump. > > This patch fixes the issue by using valid devargs. > > Fixes: f3a1188cee4a ("devargs: make device representation generic") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye > --- > dev->device.bus = &rte_vdev_bus; > dev->device.numa_node = SOCKET_ID_ANY; > - dev->device.name = devargs->name; > > if (find_vdev(name)) { > /* > @@ -300,6 +299,7 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev) > > rte_devargs_insert(&devargs); > dev->device.devargs = devargs; > + dev->device.name = devargs->name; > TAILQ_INSERT_TAIL(&vdev_device_list, dev, next); How setting the name later can have an impact here?