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 41E2842DD0; Tue, 4 Jul 2023 10:37:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7988142B8C; Tue, 4 Jul 2023 10:37:23 +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 3459D40042 for ; Tue, 4 Jul 2023 10:37:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688459841; 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=nGCOkr/TfsFahquK7KhbFKKSnMRF8gbRhbHsDfhNbOA=; b=h8xH0IpS3wuoNM9OVhHnNqIqulc1PSyuTJWqIldPww0ph9dZMZvxRKchAFEmECthQc2zS8 tLWmHJAlhCJIcQsrqQrCDnTzjwFHVzHHNooSh5z6IuPMkwnf5vtMgkWGpC82KRQK1fUCpU egH3hw8cQybe/ezoUcu2UBh4Spsn9a4= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-xNPO1zqBOMapqZiGBdeETg-1; Tue, 04 Jul 2023 04:37:19 -0400 X-MC-Unique: xNPO1zqBOMapqZiGBdeETg-1 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-3a034580aafso4569039b6e.0 for ; Tue, 04 Jul 2023 01:37:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688459839; x=1691051839; 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=nGCOkr/TfsFahquK7KhbFKKSnMRF8gbRhbHsDfhNbOA=; b=WMPbErlArsl6FWi9gnS0gt9hE5QL60eGAEZXeSrFnliChoOdjTK8eNHN1ZYaXKfqJM HyK1+HTp+s13z5IRRA9e2m7SK9Xy3vrxvGrVAQ3GH365P+HSvuyGQCNThP2yjksOCF+y ZjbVxq440jwXXjUaCUxFf/D+gDloK74jwvnTqAaRC7JpH8XQM7LmfmkS9wUNrHPFRkNR zYtUUzbPa4L49Nr6iysl+E0JS4pKszWHjmalWQuoQP+/1wvL1myi/Ylz+zRU+I/tr/jF tIMS6bXVvcl6JDJTEYwgc1/eaqTMCHNOKSIIAL5g4Bh3oozfW+h6yQqBv54IQhPjc1tF xrlQ== X-Gm-Message-State: AC+VfDx0cPOUWoKxTZIJtTk+KXNlhNM8djvw+mjvnxknK1UrDlpinYOW v2SkCrcuHALCu9/kLrIvj2Ak4O4vboHvpaOoaQyzHZpYuFQqjkABJE33dwzTWH9onH/+wDU6lC4 j8ifHuWoec0s/YsoIv3E= X-Received: by 2002:a05:6808:1522:b0:398:f84:2862 with SMTP id u34-20020a056808152200b003980f842862mr14516472oiw.52.1688459839265; Tue, 04 Jul 2023 01:37:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DVN14LTpNGQD/QgXt3hPt33qp7FFMm7/X6daJNvYIkS00BhBR9krr15P4APZTI2VFf7L5fnJ10hYnuxsmwss= X-Received: by 2002:a05:6808:1522:b0:398:f84:2862 with SMTP id u34-20020a056808152200b003980f842862mr14516463oiw.52.1688459839066; Tue, 04 Jul 2023 01:37:19 -0700 (PDT) MIME-Version: 1.0 References: <20230628121938.13452-1-viacheslavo@nvidia.com> <26612c12-8230-1481-9018-ceeafa34f993@intel.com> In-Reply-To: <26612c12-8230-1481-9018-ceeafa34f993@intel.com> From: David Marchand Date: Tue, 4 Jul 2023 10:37:07 +0200 Message-ID: Subject: Re: [PATCH] eal: fix file descriptor leakage with unhandled messages To: Viacheslav Ovsiienko Cc: "Burakov, Anatoly" , Chengwen Feng , dev@dpdk.org, stable@dpdk.org 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 Mon, Jul 3, 2023 at 12:31=E2=80=AFPM Burakov, Anatoly wrote: > On 6/28/2023 1:19 PM, Viacheslav Ovsiienko wrote: > > The sendmsg()/recvmsg() API is used to establish communication between > > the DPDK processes. The API supposes inter-process file descriptors > > sending and conversion, the recipient sees the resulting descriptors > > in the received message - the operating systems creates ones in the > > right context. > > > > The message receiving is performed by EAL in the dedicated thread > > and it might happen the message is received by EAL and not handled > > by addressed PMD or application due to some reasons (timeouts, race > > condition, etc). EAL just dropped unhandled messages causing the > > file descriptor leakage if these ones were presented in the message. > > > > The patch closes the descriptors (if any) in unhandled messages. > > > > Fixes: 783b6e54971 ("eal: add synchronous multi-process communication") Fixed the Fixes: tag (12 digits for hash). > > Cc: stable@dpdk.org > > > > Signed-off-by: Viacheslav Ovsiienko Acked-by: Chengwen Feng > Acked-by: Anatoly Burakov Applied, thanks. --=20 David Marchand