Commit 145832f
drm/xe/migrate: prevent potential UAF
If we hit the error path, the previous fence (if there is one) has
already been put() prior to this, so doing a fence_wait could lead to
UAF. Tweak the flow to do to the put() until after we do the wait.
Fixes: 270172f ("drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Maciej Patelczyk <[email protected]>
Cc: Matthew Brost <[email protected]>
Reviewed-by: Stuart Summers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
(cherry picked from commit 9b7ca35)
Signed-off-by: Rodrigo Vivi <[email protected]>1 parent 4126cb3 commit 145832f
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
1899 | 1896 | | |
1900 | 1897 | | |
1901 | 1898 | | |
1902 | 1899 | | |
1903 | 1900 | | |
1904 | 1901 | | |
1905 | 1902 | | |
1906 | | - | |
| 1903 | + | |
1907 | 1904 | | |
| 1905 | + | |
| 1906 | + | |
1908 | 1907 | | |
1909 | 1908 | | |
1910 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
1911 | 1912 | | |
1912 | 1913 | | |
1913 | 1914 | | |
| |||
0 commit comments