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 6965545538 for ; Mon, 1 Jul 2024 16:14:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62524427CB; Mon, 1 Jul 2024 16:14:51 +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 26D8642686 for ; Mon, 1 Jul 2024 16:14:49 +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-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-MNfJggbNMKKl_rSRckDHkQ-1; Mon, 01 Jul 2024 10:14:45 -0400 X-MC-Unique: MNfJggbNMKKl_rSRckDHkQ-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ec584f36bfso28334841fa.3 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=kNyUpeMZdxMxDwwMZXjz8+OJLdpDVZqfUNEBlhhT1817qDJ4B5PDp+NXY7m/Q4Zea3 z+tNZVJsmxmc/Ao7fxNgpmruxdqJtOkJjVC4q/HspcscKiDUt0Lu4HVwvTCk11KF5wfl lxgcRyXpbXP6zMk5+XgCd1TQ9BgQwB1GU6ipyhefUomsP70fSP58890yWzYuxJXb6zNv /++YZMDnq90bgvW+exKEbi5wouJl6BkQcPN/vzVxxry3BNVMxew2YtfFLfd4oF8PjqYp 5lIXC8EU/CRmpaN+oXlJkc/l08p2e/erL95JqaWsvjjSfTrrHvtLQQduoGgQhQ8E1XQx m9dw== X-Forwarded-Encrypted: i=1; AJvYcCXvu7LgQZiilA058anjlvpUVxobjjaaB4YOHTnzeWins6FREOiBgHrDPNrGhRxSco9166Z39Fi5ZiPTMV6iETw= X-Gm-Message-State: AOJu0Yx+CQaxv3Inne5AqmSVuT0haRzzaDgriVIZONYd/HNS1K5dzvGQ xNBrg3TBxBlNtWKV26ml1unTeQ0/1ULSd52wWW97SAvcK2A6zCu95x+6anGuUfXovzF1UD9bzkJ CbMyEEM0Qv21PYYfx9PI1MOLe6Mst7MjPDiiUIz/uiP/8Zkh6lVnCBOcBKRiRcS+sykF97gR5qx Guh85tZMrJAOmVqGlINto= X-Received: by 2002:a2e:bc84:0:b0:2ee:662e:8cb3 with SMTP id 38308e7fff4ca-2ee662e92c7mr29150821fa.22.1719843283669; 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: 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 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