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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <58a77f5d-74a1-4ea2-942e-a352f30f66bd@web.de>
Date: Tue, 29 Oct 2024 20:43:28 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Li Huafei <lihuafei1@...wei.com>, amd-gfx@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, Alex Deucher <alexander.deucher@....com>,
 Christian König <christian.koenig@....com>,
 Christophe Jaillet <christophe.jaillet@...adoo.fr>,
 David Airlie <airlied@...il.com>, Lijo Lazar <lijo.lazar@....com>,
 Simona Vetter <simona@...ll.ch>
Cc: LKML <linux-kernel@...r.kernel.org>, Hawking Zhang
 <Hawking.Zhang@....com>, Le Ma <le.ma@....com>, Likun Gao
 <Likun.Gao@....com>, Ma Jun <Jun.Ma2@....com>,
 Pratap Nirujogi <Pratap.Nirujogi@....com>, Tim Huang <Tim.Huang@....com>,
 Victor Lu <victorchengchi.lu@....com>, Xinhui Pan <Xinhui.Pan@....com>,
 Yifan Zhang <yifan1.zhang@....com>
Subject: Re: [PATCH v3] drm/amdgpu: Fix the memory allocation issue in
 amdgpu_discovery_get_nps_info()

…
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -1757,11 +1757,13 @@ int amdgpu_discovery_get_nps_info(struct amdgpu_device *adev,
>
>  	switch (le16_to_cpu(nps_info->v1.header.version_major)) {
>  	case 1:
> +		mem_ranges = kvcalloc(nps_info->v1.count,
> +				      sizeof(struct amdgpu_gmc_memrange),
> +				      GFP_KERNEL);
…

Can the specification “sizeof(*mem_ranges)” be more appropriate here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.12-rc5#n941

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ