artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7019ae9
)
amdkfd: use calloc instead of kzalloc to avoid integer overflow
author
jsg
<jsg@openbsd.org>
Mon, 15 Apr 2024 01:40:36 +0000
(
01:40
+0000)
committer
jsg
<jsg@openbsd.org>
Mon, 15 Apr 2024 01:40:36 +0000
(
01:40
+0000)
From Dave Airlie
315eb3c2df7e4cb18e3eacfa18a53a46f2bf0ef7
in linux-6.6.y/6.6.27
3b0daecfeac0103aba8b293df07a0cbaf8b43f29
in mainline linux
sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c
b/sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c
index
29594b0
..
4fbdc94
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c
+++ b/
sys/dev/pci/drm/amd/amdkfd/kfd_chardev.c
@@
-778,8
+778,8
@@
static int kfd_ioctl_get_process_apertures_new(struct file *filp,
* nodes, but not more than args->num_of_nodes as that is
* the amount of memory allocated by user
*/
- pa = k
zalloc((sizeof(struct kfd_process_device_apertures) *
-
args->num_of_nodes),
GFP_KERNEL);
+ pa = k
calloc(args->num_of_nodes, sizeof(struct kfd_process_device_apertures),
+ GFP_KERNEL);
if (!pa)
return -ENOMEM;