mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: sync: Reorder sync_fence_release
Previously fence's pts were freed before the were the fence was removed from the global fence list. This led to a race with the debugfs support where it would iterate over sync_pts that had been freed. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6e91f71986
commit
cc3c5cdc7b
@ -520,12 +520,12 @@ static int sync_fence_release(struct inode *inode, struct file *file)
|
|||||||
struct sync_fence *fence = file->private_data;
|
struct sync_fence *fence = file->private_data;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
sync_fence_free_pts(fence);
|
|
||||||
|
|
||||||
spin_lock_irqsave(&sync_fence_list_lock, flags);
|
spin_lock_irqsave(&sync_fence_list_lock, flags);
|
||||||
list_del(&fence->sync_fence_list);
|
list_del(&fence->sync_fence_list);
|
||||||
spin_unlock_irqrestore(&sync_fence_list_lock, flags);
|
spin_unlock_irqrestore(&sync_fence_list_lock, flags);
|
||||||
|
|
||||||
|
sync_fence_free_pts(fence);
|
||||||
|
|
||||||
kfree(fence);
|
kfree(fence);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user