linux/drivers/accel/habanalabs
Thorsten Blum 1414220d5b accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()
commit a44458dfd5 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: f728c17fc9 ("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>
History 2025-08-28 16:31:06 +02:00
..
common habanalabs: fix UAF in export_dmabuf() 2025-08-20 18:30:17 +02:00
gaudi accel/habanalabs: no CPUCP prints on heartbeat failure 2024-06-23 09:45:51 +03:00
gaudi2 accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc() 2025-08-28 16:31:06 +02:00
goya accel/habanalabs: no CPUCP prints on heartbeat failure 2024-06-23 09:45:51 +03:00
include accel/habanalbs/gaudi2: reduce interrupt count to 128 2024-06-23 09:53:07 +03:00
Kconfig habanalabs: move driver to accel subsystem 2023-01-26 11:52:10 +02:00
Makefile habanalabs: move driver to accel subsystem 2023-01-26 11:52:10 +02:00