mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 00:43:08 -04:00
habanalabs: zero ts registration buff when allocated
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>
This commit is contained in:
committed by
Oded Gabbay
parent
4a9c6e2cdf
commit
679e968908
@@ -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 = vmalloc(size);
|
||||
p = vzalloc(size);
|
||||
if (!p)
|
||||
goto free_user_buff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user