Skip to content

Commit df64722

Browse files
tobluxgregkh
authored andcommitted
accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()
commit a44458d upstream. Use kvfree() to fix the following Coccinelle/coccicheck warning reported by kfree_mismatch.cocci: WARNING kvmalloc is used to allocate this memory at line 10398 Fixes: f728c17 ("accel/habanalabs/gaudi2: move HMMU page tables to device memory") Reported-by: Qianfeng Rong <rongqianfeng@vivo.com> Closes: https://patch.msgid.link/20250808085530.233737-1-rongqianfeng@vivo.com Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> [lukas: acknowledge Qianfeng, adjust Thorsten's domain, add Fixes tag] Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Tomer Tayar <ttayar@habana.ai> Cc: stable@vger.kernel.org # v6.9+ Link: https://patch.msgid.link/20240820231028.136126-1-thorsten.blum@toblux.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cde3a90 commit df64722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/habanalabs/gaudi2/gaudi2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10437,7 +10437,7 @@ static int gaudi2_memset_device_memory(struct hl_device *hdev, u64 addr, u64 siz
1043710437
(u64 *)(lin_dma_pkts_arr), DEBUGFS_WRITE64);
1043810438
WREG32(sob_addr, 0);
1043910439

10440-
kfree(lin_dma_pkts_arr);
10440+
kvfree(lin_dma_pkts_arr);
1044110441

1044210442
return rc;
1044310443
}

0 commit comments

Comments
 (0)