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 420A145BB4; Wed, 23 Oct 2024 18:06:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CCE142E55; Wed, 23 Oct 2024 18:06:42 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A15A1402DF for ; Wed, 23 Oct 2024 18:06:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729699600; 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=NT199RM06OJ0tZRJwMskCJruqPQPl5xlyrQCpsVnRGA=; b=I83UmN8Nrzqq6cV9IoCNV5NEzec5hbaWAhxgXYjEjG7wX+B0A/ZAPvnrpRpNAWPcS7W8P4 FZrIcnh/RVGd9Qc9mCIftizGjVUG3qh7krsVJ6nCTXcn5J/CUY4zqg125JnJcHGj2Cv2YH CCQkdGGV1MqAl4IMzRxkXYImATQ454s= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-412-pSDauYYNMBqS8dJ4QWVlqQ-1; Wed, 23 Oct 2024 12:06:39 -0400 X-MC-Unique: pSDauYYNMBqS8dJ4QWVlqQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539f7ed336bso5421265e87.2 for ; Wed, 23 Oct 2024 09:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729699597; x=1730304397; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NT199RM06OJ0tZRJwMskCJruqPQPl5xlyrQCpsVnRGA=; b=CJMWOsckf3MgKGggZEGNDky9CHvxwZPWnSy07S8jXysX1titU4drOM5dvAbVn9rLpP l6Vw+wOMpb/48lgtAuDtvPOllQ5hPs2XFGf+pTd7TAIYbLud6AvjeEC9ih1RFLvR43oF O3wvFwi9qiI1SXm8s/cyH/IceuNUojUkm0hKh0cfuZ/FlfrQvSNFVnoD0htshYVQruqg hp6kDnMn8ahOKTA0au0p3ZstAhlfnwplwkfZQIeiv4Y6aX/03DgtJ8+2jpHyZeR4SjLq rwdoB8n4nsFygAghDb2+5TDpkHiV7jQwQhEGWTtrCrYAAbmE3Oqp+qis9h8MvJ00R6gC oS+w== X-Gm-Message-State: AOJu0Yyok37zbwf3BgVeKhbHoEpeVxu77qWZDvWO4MNKBik5KDiHizkg sWurvw+O+yMueGi9mqOUyxJEj87ZqFRMokaRVK6hySVPXMOrvFGNjUXA9q3ACx97itMYwwyzQHC 7rs2nxpQp/dRVGvNn8d8d6M76stMZ8cXHiKfoXirbGXlOj6l/kgVQiPXIzYp8ou+wUD7lD0kIBX zIWMaLoc5F0Nrvs+0= X-Received: by 2002:a05:6512:130b:b0:539:f675:84d7 with SMTP id 2adb3069b0e04-53b1a313518mr2021758e87.32.1729699597091; Wed, 23 Oct 2024 09:06:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOh0HXEf7rYqExcrsAljDOL/WcU25KjWDIVEXbJLlxAFX+ujSHxk/hFf7ulyvj1RN1Gjcp9w7l5kSTjvTqEUQ= X-Received: by 2002:a05:6512:130b:b0:539:f675:84d7 with SMTP id 2adb3069b0e04-53b1a313518mr2021738e87.32.1729699596679; Wed, 23 Oct 2024 09:06:36 -0700 (PDT) MIME-Version: 1.0 References: <20241023151552.2863387-1-maxime.coquelin@redhat.com> <20241023151552.2863387-2-maxime.coquelin@redhat.com> In-Reply-To: <20241023151552.2863387-2-maxime.coquelin@redhat.com> From: David Marchand Date: Wed, 23 Oct 2024 18:06:25 +0200 Message-ID: Subject: Re: [PATCH 1/6] vhost: fix vduse device creation error handling To: Maxime Coquelin Cc: dev@dpdk.org, chenbox@nvidia.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Oct 23, 2024 at 5:16=E2=80=AFPM Maxime Coquelin wrote: > > This patch fixes missing reconnection log unmapping > miss in the error path at VDUSE creation time. > > Coverity issue: 445525 > Fixes: da79cc7fda76 ("vhost: add reconnection support to VDUSE") > > Signed-off-by: Maxime Coquelin VDUSE* in the title, for consistency please. Reviewed-by: David Marchand One comment below. > --- > lib/vhost/vduse.c | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > > diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c > index f9ac317438..89bc29a33f 100644 > --- a/lib/vhost/vduse.c > +++ b/lib/vhost/vduse.c > @@ -488,7 +488,7 @@ vduse_device_create(const char *path, bool compliant_= ol_flags) > struct vduse_dev_config *dev_config =3D NULL; dev_config could be allocated on the stack, rather than the heap. But at least, move dev_config declaration in the block where it is used, this will limit the chance a future change introduces a leak. > const char *name =3D path + strlen("/dev/vduse/"); > char reconnect_file[PATH_MAX]; > - struct vhost_reconnect_data *reconnect_log =3D NULL; > + struct vhost_reconnect_data *reconnect_log =3D MAP_FAILED; > bool reconnect =3D false; > > if (vduse.fdset =3D=3D NULL) { --=20 David Marchand