Commit 41d4193
drm/i915: Avoid potential vm use-after-free
Adding the vm to the vm_xa table makes it visible to userspace, which
could try to race with us to close the vm. So we need to take our extra
reference before putting it in the table.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Fixes: 9ec8795 ("drm/i915: Drop __rcu from gem_context->vm")
Cc: <[email protected]> # v5.16+
Signed-off-by: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 99343c4)
Signed-off-by: Rodrigo Vivi <[email protected]>1 parent 6d796c5 commit 41d4193
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1861 | 1861 | | |
1862 | 1862 | | |
1863 | 1863 | | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
1864 | 1872 | | |
1865 | | - | |
| 1873 | + | |
| 1874 | + | |
1866 | 1875 | | |
1867 | | - | |
1868 | | - | |
| 1876 | + | |
1869 | 1877 | | |
1870 | 1878 | | |
1871 | 1879 | | |
| |||
0 commit comments