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 6536242DD0 for ; Tue, 4 Jul 2023 10:37:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E2D140E03; 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.129.124]) by mails.dpdk.org (Postfix) with ESMTP id BDD7640042 for ; Tue, 4 Jul 2023 10:37:21 +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-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-339-Elo-tdnuMJuyLpl_ZB_81w-1; Tue, 04 Jul 2023 04:37:19 -0400 X-MC-Unique: Elo-tdnuMJuyLpl_ZB_81w-1 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-1b024a30c25so5887110fac.2 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=WuT1A/RvhPl3ojLh/s0WAc2puD/KFlqBei9aSSYW4ze7AAhnhopn0FqykHOtcrJFpy 4hgfCjeTX8Mmf2tztQUUYpmDNGSaOMJYjcSwrPeEfVMaLkOlLh3Qc1KIvRRqT+aeXcv/ a7kuExiNX3671uzrmdYseu6Cx12Zube4yTK1iP/TMpSgsIZQoep1onSpmjMZb8hNBfr2 s0kml4vdVMWQHT9YdaZQKUBLib4hVkdOCAsyyiPsAxmiqKnWVBRnaCKRmAkc93OlS8fT 28WgvofyDw1OTJ+0NFVBnQ46K/CjmRlYR2BxU6LaWYt6HrtOYtf3FfypZS7EC4o+F+p3 R+ig== X-Gm-Message-State: AC+VfDz3BLy/p+57yMVR6A8i1hsakLBQ5PgMCvlZSBTvnHviUTtWacYf OWG28k6HU+Oss/Jl+jmDj2OxwnAb1puBUHXFtyoRHmEz6OyYsaZAJw3NRmYQ2l108MkwVHdqD0G 5WbRgqOa1dxSS57gZ0srohug= X-Received: by 2002:a05:6808:1522:b0:398:f84:2862 with SMTP id u34-20020a056808152200b003980f842862mr14516470oiw.52.1688459839245; 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: stable@dpdk.org X-Mailman-Version: 2.1.29 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 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