From: Koby Elbaz kelbaz@habana.ai
stable inclusion from stable-5.10.52 commit f22649cf90c3b674cc0f1cc4951fddd5e6e2a5e6 bugzilla: 175542 https://gitee.com/openeuler/kernel/issues/I4DTKU
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
[ Upstream commit f5eb7bf0c487a212ebda3c1b048fc3ccabacc147 ]
fix the following smatch warnings:
goya_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list
gaudi_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list
Signed-off-by: Koby Elbaz kelbaz@habana.ai Reviewed-by: Oded Gabbay ogabbay@kernel.org Signed-off-by: Oded Gabbay ogabbay@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org Signed-off-by: Chen Jun chenjun102@huawei.com Acked-by: Weilong Chen chenweilong@huawei.com Signed-off-by: Chen Jun chenjun102@huawei.com --- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/goya/goya.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 044b2ae196f9..37edd663603f 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -3708,6 +3708,7 @@ static int gaudi_pin_memory_before_cs(struct hl_device *hdev, return 0;
unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr); diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index 986ed3c07208..5b5d6275c249 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -3190,6 +3190,7 @@ static int goya_pin_memory_before_cs(struct hl_device *hdev, return 0;
unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr);