From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 24F3758F6; Tue, 27 Nov 2018 11:30:31 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E3C558E2A; Tue, 27 Nov 2018 10:30:30 +0000 (UTC) Received: from localhost (dhcp-192-209.str.redhat.com [10.33.192.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06F9119C65; Tue, 27 Nov 2018 10:30:29 +0000 (UTC) Date: Tue, 27 Nov 2018 11:30:28 +0100 From: Jens Freimann To: Maxime Coquelin Cc: dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com, stable@dpdk.org Message-ID: <20181127103028.tsbjraer4oz3wiss@jenstp.localdomain> References: <20181127095451.18217-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181127095451.18217-1-maxime.coquelin@redhat.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 27 Nov 2018 10:30:30 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2] vhost: fix possible null pointer dereferencing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 10:30:31 -0000 On Tue, Nov 27, 2018 at 10:54:51AM +0100, Maxime Coquelin wrote: >If mmap() call fails in vhost_user_set_mem_table, dev->mem >is set to NULL. If later, qva_to_vva() is called, a segfault >occurs. > >Fixes: 8f972312b8f4 ("vhost: support vhost-user") >Cc: stable@dpdk.org > >Reviewed-by: Tiwei Bie >Signed-off-by: Maxime Coquelin >--- > lib/librte_vhost/vhost_user.c | 6 ++++++ > 1 file changed, 6 insertions(+) > Jumping to an out label would have worked as well, but it doesn't really matter. Reviewed-by: Jens Freimann