lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPuf4KyzR/h85eUs@lizhi-Precision-Tower-5810>
Date: Fri, 24 Oct 2025 11:48:48 -0400
From: Frank Li <Frank.li@....com>
To: Koichiro Den <den@...inux.co.jp>
Cc: ntb@...ts.linux.dev, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, jdmason@...zu.us,
	dave.jiang@...el.com, allenbh@...il.com, mani@...nel.org,
	kwilczynski@...nel.org, kishon@...nel.org, bhelgaas@...gle.com,
	jbrunet@...libre.com, lpieralisi@...nel.org, yebin10@...wei.com,
	geert+renesas@...der.be, arnd@...db.de
Subject: Re: [PATCH 2/6] PCI: endpoint: Fix parameter order for .drop_link

On Thu, Oct 23, 2025 at 04:17:53PM +0900, Koichiro Den wrote:
> The unlink callbacks passed the parameters in the wrong order that led
> to looking up the wrong group objects. Swap the arguments so that the
> first parameter is the epf item and the second is the epc item.
>
> Cc: <stable@...r.kernel.org>
> Fixes: e85a2d783762 ("PCI: endpoint: Add support in configfs to associate two EPCs with EPF")
> Signed-off-by: Koichiro Den <den@...inux.co.jp>

Nice found.

Reviewed-by: Frank Li <Frank.Li@....com>

> ---
>  drivers/pci/endpoint/pci-ep-cfs.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
> index ef50c82e647f..c7cf6c76d116 100644
> --- a/drivers/pci/endpoint/pci-ep-cfs.c
> +++ b/drivers/pci/endpoint/pci-ep-cfs.c
> @@ -69,8 +69,8 @@ static int pci_secondary_epc_epf_link(struct config_item *epf_item,
>  	return 0;
>  }
>
> -static void pci_secondary_epc_epf_unlink(struct config_item *epc_item,
> -					 struct config_item *epf_item)
> +static void pci_secondary_epc_epf_unlink(struct config_item *epf_item,
> +					 struct config_item *epc_item)
>  {
>  	struct pci_epf_group *epf_group = to_pci_epf_group(epf_item->ci_parent);
>  	struct pci_epc_group *epc_group = to_pci_epc_group(epc_item);
> @@ -133,8 +133,8 @@ static int pci_primary_epc_epf_link(struct config_item *epf_item,
>  	return 0;
>  }
>
> -static void pci_primary_epc_epf_unlink(struct config_item *epc_item,
> -				       struct config_item *epf_item)
> +static void pci_primary_epc_epf_unlink(struct config_item *epf_item,
> +				       struct config_item *epc_item)
>  {
>  	struct pci_epf_group *epf_group = to_pci_epf_group(epf_item->ci_parent);
>  	struct pci_epc_group *epc_group = to_pci_epc_group(epc_item);
> --
> 2.48.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ