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: <b9abd0ab-79d8-5e41-20e4-d8218d58693b@linux.ibm.com>
Date:   Wed, 26 Oct 2022 15:40:49 +0200
From:   Christian Borntraeger <borntraeger@...ux.ibm.com>
To:     Rafael Mendonca <rafaelmendsr@...il.com>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Eric Farman <farman@...ux.ibm.com>,
        Janosch Frank <frankja@...ux.ibm.com>,
        Claudio Imbrenda <imbrenda@...ux.ibm.com>,
        David Hildenbrand <david@...hat.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>
Cc:     linux-s390@...r.kernel.org, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: s390: pci: Fix allocation size of aift kzdev
 elements

Am 26.10.22 um 03:32 schrieb Rafael Mendonca:
> The 'kzdev' field of struct 'zpci_aift' is an array of pointers to
> 'kvm_zdev' structs. Allocate the proper size accordingly.
> 
> Reported by Coccinelle:
>    WARNING: Use correct pointer type argument for sizeof
> 
> Fixes: 98b1d33dac5f ("KVM: s390: pci: do initial setup for AEN interpretation")
> Signed-off-by: Rafael Mendonca <rafaelmendsr@...il.com>

Reviewed-by: Christian Borntraeger <borntraeger@...ux.ibm.com>

> ---
>   arch/s390/kvm/pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/pci.c b/arch/s390/kvm/pci.c
> index c50c1645c0ae..ded1af2ddae9 100644
> --- a/arch/s390/kvm/pci.c
> +++ b/arch/s390/kvm/pci.c
> @@ -126,7 +126,7 @@ int kvm_s390_pci_aen_init(u8 nisc)
>   		return -EPERM;
>   
>   	mutex_lock(&aift->aift_lock);
> -	aift->kzdev = kcalloc(ZPCI_NR_DEVICES, sizeof(struct kvm_zdev),
> +	aift->kzdev = kcalloc(ZPCI_NR_DEVICES, sizeof(struct kvm_zdev *),
>   			      GFP_KERNEL);
>   	if (!aift->kzdev) {
>   		rc = -ENOMEM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ