projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a9c6e2
)
habanalabs: zero ts registration buff when allocated
author
farah kassabri
<fkassabri@habana.ai>
Tue, 20 Sep 2022 08:48:40 +0000
(11:48 +0300)
committer
Oded Gabbay
<ogabbay@kernel.org>
Wed, 23 Nov 2022 14:13:45 +0000
(16:13 +0200)
To avoid memory corruption in kernel memory while using timestamp
registration nodes, zero the kernel buff memory when its allocated.
Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/memory.c
patch
|
blob
|
history
diff --git
a/drivers/misc/habanalabs/common/memory.c
b/drivers/misc/habanalabs/common/memory.c
index
99b1d6c
..
541e1b6
100644
(file)
--- a/
drivers/misc/habanalabs/common/memory.c
+++ b/
drivers/misc/habanalabs/common/memory.c
@@
-2109,7
+2109,7
@@
static int hl_ts_alloc_buf(struct hl_mmap_mem_buf *buf, gfp_t gfp, void *args)
/* Allocate the internal kernel buffer */
size = num_elements * sizeof(struct hl_user_pending_interrupt);
- p = v
m
alloc(size);
+ p = v
z
alloc(size);
if (!p)
goto free_user_buff;