From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2F63A0524 for ; Fri, 6 Nov 2020 09:13:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA84A2E8B; Fri, 6 Nov 2020 09:13:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 7F8502E8B for ; Fri, 6 Nov 2020 09:13:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604650417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y7A0iOKjtSF6Iw49S8oV0FZBflAeXrG1KvfRTkvIbzw=; b=REiGm2p3D6e18hR57Z2BEl8EMlnreNqUUqACIBWEPIRjtCALtaH7mWIgSOTEE+NaV5Nm3E Z/WdClompc5kror5EHgq4rAfdnXNVbdzfMLfTktladmSgE1jN16rEMRw68RC5TpufVPZh3 aWk1699OUliWwgEQGSu90K8WprgQZjU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-d5rlOkY2N5WvaM7xjASCVQ-1; Fri, 06 Nov 2020 03:13:35 -0500 X-MC-Unique: d5rlOkY2N5WvaM7xjASCVQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A02E11084D65; Fri, 6 Nov 2020 08:13:33 +0000 (UTC) Received: from [10.36.110.29] (unknown [10.36.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F1014100239A; Fri, 6 Nov 2020 08:13:31 +0000 (UTC) To: "Xia, Chenbo" , "dev@dpdk.org" , "Ding, Xuan" , "stephen@networkplumber.org" , "Yigit, Ferruh" , "thomas@monjalon.net" Cc: "stable@dpdk.org" References: <20201105114549.97717-1-maxime.coquelin@redhat.com> <20201105114549.97717-2-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <80fa84c9-5e25-42e0-6927-f48399e446c2@redhat.com> Date: Fri, 6 Nov 2020 09:13:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH 1/3] vhost: fix error path when setting memory tables X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" On 11/6/20 3:53 AM, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Thursday, November 5, 2020 7:46 PM >> To: dev@dpdk.org; Ding, Xuan ; >> stephen@networkplumber.org; Yigit, Ferruh ; >> thomas@monjalon.net; Xia, Chenbo >> Cc: stable@dpdk.org; Maxime Coquelin >> Subject: [PATCH 1/3] vhost: fix error path when setting memory tables >> >> If the an error is encountered before the memory regions > 'the' should be deleted. > >> are parsed, the file descriptors for these shared buffers >> is leaked. > s/is/are/ > >> This patch fixes this by closing the message file descriptors >> on error, taking care of avoiding double closing of the file >> descriptors. guest_pages is also freed, even though it was not >> leaked as its pointer was not overiden on subsequent function > s/overiden/overridden > > With above changes: > > Reviewed-by: Chenbo Xia > I agree with all above comments. Will fix in v2. Thanks, Maxime