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] [day] [month] [year] [list]
Message-ID: <20200522113748.GC11785@e121166-lin.cambridge.arm.com>
Date:   Fri, 22 May 2020 12:37:48 +0100
From:   Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc:     Kishon Vijay Abraham I <kishon@...com>,
        Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Prabhakar <prabhakar.csengg@...il.com>
Subject: Re: [PATCH] PCI: endpoint: Fix epc windows allocation in
 pci_epc_multi_mem_init()

On Tue, May 19, 2020 at 04:11:20PM +0100, Lad Prabhakar wrote:
> Fix allocation of epc windows with the correct size, this also fix smatch
> warning:
> 
> drivers/pci/endpoint/pci-epc-mem.c:65 pci_epc_multi_mem_init()
> warn: double check that we're allocating correct size: 4 vs 112
> 
> Fixes: ecbae87 ("PCI: endpoint: Add support to handle multiple base for mapping outbound memory")
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> Reported-by: kbuild test robot <lkp@...el.com>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/pci/endpoint/pci-epc-mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Squashed in the original commit in pci/rcar, pushed out.

Thanks,
Lorenzo

> diff --git a/drivers/pci/endpoint/pci-epc-mem.c b/drivers/pci/endpoint/pci-epc-mem.c
> index 2325f74..80c46f3 100644
> --- a/drivers/pci/endpoint/pci-epc-mem.c
> +++ b/drivers/pci/endpoint/pci-epc-mem.c
> @@ -62,7 +62,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc,
>  	if (!windows || !num_windows)
>  		return -EINVAL;
>  
> -	epc->windows = kcalloc(num_windows, sizeof(*mem), GFP_KERNEL);
> +	epc->windows = kcalloc(num_windows, sizeof(*epc->windows), GFP_KERNEL);
>  	if (!epc->windows)
>  		return -ENOMEM;
>  
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ