* [PATCH] accel/habanalabs: fix mismatched alloc/free for kvcalloc()
@ 2025-08-08 8:55 Qianfeng Rong
2025-08-16 11:06 ` Lukas Wunner
0 siblings, 1 reply; 3+ messages in thread
From: Qianfeng Rong @ 2025-08-08 8:55 UTC (permalink / raw)
To: Yaron Avizrat, Oded Gabbay, Qianfeng Rong, Farah Kassabri,
dri-devel, linux-kernel
Replace kfree() with kvfree() for memory allocated by kvcalloc().
Compile-tested only.
Fixes: f728c17fc97a ("accel/habanalabs/gaudi2: move HMMU page tables to device memory")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index a38b88baadf2..5722e4128d3c 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -10437,7 +10437,7 @@ static int gaudi2_memset_device_memory(struct hl_device *hdev, u64 addr, u64 siz
(u64 *)(lin_dma_pkts_arr), DEBUGFS_WRITE64);
WREG32(sob_addr, 0);
- kfree(lin_dma_pkts_arr);
+ kvfree(lin_dma_pkts_arr);
return rc;
}
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/habanalabs: fix mismatched alloc/free for kvcalloc()
2025-08-08 8:55 [PATCH] accel/habanalabs: fix mismatched alloc/free for kvcalloc() Qianfeng Rong
@ 2025-08-16 11:06 ` Lukas Wunner
2025-08-16 11:31 ` Qianfeng Rong
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wunner @ 2025-08-16 11:06 UTC (permalink / raw)
To: Qianfeng Rong
Cc: Yaron Avizrat, Oded Gabbay, Farah Kassabri, dri-devel,
linux-kernel, Koby Elbaz, Konstantin Sinyuk
On Fri, Aug 08, 2025 at 04:55:27PM +0800, Qianfeng Rong wrote:
> Replace kfree() with kvfree() for memory allocated by kvcalloc().
>
> Compile-tested only.
>
> Fixes: f728c17fc97a ("accel/habanalabs/gaudi2: move HMMU page tables to device memory")
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Thorsten Blum submitted an identical patch a year earlier:
https://patch.msgid.link/20240820231028.136126-1-thorsten.blum@toblux.com
I've just applied his patch but added a Reported-by tag with your name to
acknowledge your contribution.
Thanks!
Lukas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/habanalabs: fix mismatched alloc/free for kvcalloc()
2025-08-16 11:06 ` Lukas Wunner
@ 2025-08-16 11:31 ` Qianfeng Rong
0 siblings, 0 replies; 3+ messages in thread
From: Qianfeng Rong @ 2025-08-16 11:31 UTC (permalink / raw)
To: Lukas Wunner
Cc: Yaron Avizrat, Oded Gabbay, Farah Kassabri, dri-devel,
linux-kernel, Koby Elbaz, Konstantin Sinyuk
在 2025/8/16 19:06, Lukas Wunner 写道:
> [You don't often get email from lukas@wunner.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Fri, Aug 08, 2025 at 04:55:27PM +0800, Qianfeng Rong wrote:
>> Replace kfree() with kvfree() for memory allocated by kvcalloc().
>>
>> Compile-tested only.
>>
>> Fixes: f728c17fc97a ("accel/habanalabs/gaudi2: move HMMU page tables to device memory")
>> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> Thorsten Blum submitted an identical patch a year earlier:
> https://patch.msgid.link/20240820231028.136126-1-thorsten.blum@toblux.com
>
> I've just applied his patch but added a Reported-by tag with your name to
> acknowledge your contribution.
it's ok, thanks.
>
> Thanks!
>
> Lukas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-16 11:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-08 8:55 [PATCH] accel/habanalabs: fix mismatched alloc/free for kvcalloc() Qianfeng Rong
2025-08-16 11:06 ` Lukas Wunner
2025-08-16 11:31 ` Qianfeng Rong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®