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 362DAA00C4; Sat, 29 Jan 2022 20:07:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A2E240E0F; Sat, 29 Jan 2022 20:07:54 +0100 (CET) Received: from out162-62-58-211.mail.qq.com (out162-62-58-211.mail.qq.com [162.62.58.211]) by mails.dpdk.org (Postfix) with ESMTP id D991340041 for ; Sat, 29 Jan 2022 20:07:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1643483265; bh=x5OVWoy8pdxTzC7mAeLQR9RJhWBkq+UO8AmuKCmELhg=; h=From:To:Cc:Subject:Date; b=DN6hW+t503lg5pjEIqZ2QUIz/pPzO9+e2Plj/XvmrPLyJ/rPHkeFWf4gzf/6nVzH+ XUCP95hU/pmcH/CbjHnQ5ePaa8EpE+/rH7+c1rW4u28MQUPKnfx5hwbqqyMUo3uUiU qOzDEuGgB65f9+jQDOLq8cVbJwamBFDDQkLQs46U= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszc11.qq.com (NewEsmtp) with SMTP id 1E4106B4; Sun, 30 Jan 2022 03:07:36 +0800 X-QQ-mid: xmsmtpt1643483256ti2ech571 Message-ID: X-QQ-XMAILINFO: M5MiK8h9PoyRqSFSivLelmPmEigLQvG4nToYXlHfazSXRFTVVuMiBu9iyRLR9p 2zPFHUAHOo2Y+xn4MXtnbatS5dKn8t/Izdgsd+vUeqel5u5N/N4G313UmaB9Vd9opUQILN4OE1mc Sxki2dHF/BlMxH2y+vJ3awkUw5ostie2p/gt/D1S0H82lCuOlrYw1ib5xh6QAmpFDI+qVJl/jmSm mCurwYK5MoCn/elLKgqfEbwqq6/hkIjGTuoZIloXWiAXVADEHbg6u7QQCQIF2f/fFX7nEnDjJ+dT 9vpSDM57S3iAkJDN77PdXGkThoQj8Fis8conaER4esr4v04KWSzn7FsuBM6A+PN+5N4PMBI/5iBL FsI45aa6nu+S1+0b8Gnm8/aaS7yG0QNoB84nOktX8M6YsaNodSCC854bl0OTB5F+D27fwODw+NGr aiulsFQzmRYM+YBxbATya1r8P5ua7lYCS/MqWmlCGsgZiixjdbUS6BLmJVD4hCAxxhbZNQcpqcQT ktSQTqPVJvZitj1kIUdpD49Pr9kDdypb/xD+vQwCgRPFzj7p6YHkshwUpD2Rk4S+V22kJJeZNCaN ery/14tqOA7xt+9hkR0Dw00pCcGaBhf4PeSyoc9YwFtwh08dzzUmeOS38R3k4NJHR+nUCGb7t/9e /V36R73IWcd3WlijkSRoKt3OUEz1jAxhA3Cg7MClB8kBWFU2snfjeJgzTAYkd4JWJAWF7UPUy1mJ kjwthzM7Bs++VM3FN9baKXc+f3FnUSc65o85HIdhSVvfG4Sd2tLAMVVzNY5YhRq2VfdwIHMK9c8Z xwiL/LQJakOmC1efejgqrmFYFhAWXBytShgBBrdqOhP73pvCQvJ8TeH/MGi616/fiRQZjJBiNroS OJG1ZRJVM2KW35e2ijg45oi3HJXEuMXbOlS59jvmEu From: Weiguo Li To: chenbo.xia@intel.com Cc: maxime.coquelin@redhat.com, dev@dpdk.org Subject: [PATCH] vhost: fix null pointer dereference Date: Sun, 30 Jan 2022 03:07:35 +0800 X-OQ-MSGID: <20220129190735.685310-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 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 Fixes: 155ee3542fb1 ("vhost: improve vhost-user layer logs") Signed-off-by: Weiguo Li --- lib/vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index e8297a09eb..d032998488 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -671,7 +671,7 @@ numa_realloc(struct virtio_net *dev, int index) dev = rte_realloc_socket(old_dev, sizeof(*dev), 0, node); if (!dev) { VHOST_LOG_CONFIG(ERR, "(%s) failed to realloc dev on node %d\n", - dev->ifname, node); + old_dev->ifname, node); return old_dev; } -- 2.25.1