Patch "habanalabs: remove node from list before freeing the node" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    habanalabs: remove node from list before freeing the node

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     habanalabs-remove-node-from-list-before-freeing-the-.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8da8bb37154663203d0a386893bfe169d225b116
Author: Koby Elbaz <kelbaz@xxxxxxxxx>
Date:   Wed Jun 9 21:43:52 2021 +0300

    habanalabs: remove node from list before freeing the node
    
    [ 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@xxxxxxxxx>
    Reviewed-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
    Signed-off-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index f6a56d5f2ae7..d4f764da013c 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -4934,6 +4934,7 @@ already_pinned:
 	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 e0ad2a269779..d4ac10b9f25e 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -3270,6 +3270,7 @@ already_pinned:
 	return 0;
 
 unpin_memory:
+	list_del(&userptr->job_node);
 	hl_unpin_host_memory(hdev, userptr);
 free_userptr:
 	kfree(userptr);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux