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 1F2B845538; Mon, 1 Jul 2024 16:14:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E44F42686; Mon, 1 Jul 2024 16:14:50 +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 0985840264 for ; Mon, 1 Jul 2024 16:14:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719843288; 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=z+qVzgp1NI19HoBosS+xoZ6zDe5eBlyAXMQPL1jlOWQ=; b=Gr9fH+VotITwMD4NEbzjC7aaNiuoWeLykU2jXJE/hc3kycC3t1EejH6LZd6CStX/slUjKm 5OwRw6f1MF3FtBH3J5enW8KrCIkWye5WjgfYZCC/Cy+Q/qondjKvTU+AcTyJGA1miY1K50 Sm3+7GtTQNyezagTtv+YWGmKM1TIA0Q= 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-484-dFe2mkHQML-141Hn8F-Kbg-1; Mon, 01 Jul 2024 10:14:45 -0400 X-MC-Unique: dFe2mkHQML-141Hn8F-Kbg-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52e76856405so3137533e87.1 for ; Mon, 01 Jul 2024 07:14:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719843283; x=1720448083; 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=z+qVzgp1NI19HoBosS+xoZ6zDe5eBlyAXMQPL1jlOWQ=; b=xCpm1h2FkJHl6JAwGM8Mu7mN9/1uLt4wWep7RKpBsO9EG8QhevjOlxisLbGBG81BNP I0/0MjvugTmcI4vxD4oRWPeD6eTkDuhee7upxB4N+IYU8EB3PO0LGGYxHBBh19yGqInT o4WN45seQe2FJjVoPPrH6N8e4htN5O8mpHsf87FdgFUSxdbGbnNddnZFxN7BGJ+aRDqm jrJ4geSdUuepmitune3Ra4jXTalHFiKx9RdT4fnIfRf9zOS9RccFzL7uvJsBEjNCkB5o iw32Oh6batMoyBZrQA70FvgIOTJXS9YfrxlpE24KZ+wHxfuzI4eWr7aA96gA5uNn7TXV JKaw== X-Gm-Message-State: AOJu0YwTUh8qejDnuOg1dQBZJia5SNyZC9UrAOa2h/hKaa7mk45G50Qp MgTN/2XL44sTLHfmA10RQInBnpqe+d46jmzSX9uzqqa4bseVcYnxZP8Jf0S3NhNERKCVloGlMJC h35QTA+Xvf0Q6b18lNKz0kxf5YbaUml8q5K1K3oiAXtLdcWEah6DgtjLFh1zsRAxODx1g1e1D6L Jzd8rdbZu4MrQjnrQ= X-Received: by 2002:a2e:bc84:0:b0:2ee:662e:8cb3 with SMTP id 38308e7fff4ca-2ee662e92c7mr29150841fa.22.1719843283671; Mon, 01 Jul 2024 07:14:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFa2n7DUjpq6NZ/E/0k6yQZzcgJVtvPnogLiVX+jW0aGJ1xYvuuJ0fRV7SFwqcJchVkN0maZpJzGUox+y6Arnk= X-Received: by 2002:a2e:bc84:0:b0:2ee:662e:8cb3 with SMTP id 38308e7fff4ca-2ee662e92c7mr29150671fa.22.1719843283308; Mon, 01 Jul 2024 07:14:43 -0700 (PDT) MIME-Version: 1.0 References: <20240419032630.1215256-1-chaoyong.he@corigine.com> <20240628073624.4122899-1-chaoyong.he@corigine.com> <20240628073624.4122899-4-chaoyong.he@corigine.com> In-Reply-To: <20240628073624.4122899-4-chaoyong.he@corigine.com> From: David Marchand Date: Mon, 1 Jul 2024 16:14:30 +0200 Message-ID: Subject: Re: [PATCH v4 3/3] bus/pci: fix secondary process save 'FD' problem To: Chaoyong He Cc: dev@dpdk.org, oss-drivers@corigine.com, Zerun Fu , mukawa@igel.co.jp, stable@dpdk.org, Long Wu , Peng Zhang 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 Fri, Jun 28, 2024 at 9:37=E2=80=AFAM Chaoyong He wrote: > > From: Zerun Fu > > In the previous logic the 'fd' was only saved in the primary process, > but for some devices this value is also used in the secondary logic. > > For example, the call of 'rte_pci_find_ext_capability()' will fail in > the secondary process. > > Fix this problem by getting and saving the value of 'fd' also in the > secondary process logic. > > Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd") > Cc: mukawa@igel.co.jp > Cc: stable@dpdk.org > > Signed-off-by: Zerun Fu > Reviewed-by: Chaoyong He > Reviewed-by: Long Wu > Reviewed-by: Peng Zhang I did not enter in depth, but I wonder if this change leaks fd in a secondary process when unmapping UIO resources. --=20 David Marchand