Commit db7f92a
drm/xe/ct: prevent UAF in send_recv()
Ensure we serialize with completion side to prevent UAF with fence going
out of scope on the stack, since we have no clue if it will fire after
the timeout before we can erase from the xa. Also we have some dependent
loads and stores for which we need the correct ordering, and we lack the
needed barriers. Fix this by grabbing the ct->lock after the wait, which
is also held by the completion side.
v2 (Badal):
- Also print done after acquiring the lock and seeing timeout.
Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Badal Nilawar <[email protected]>
Cc: <[email protected]> # v6.8+
Reviewed-by: Badal Nilawar <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 52789ce)
Signed-off-by: Lucas De Marchi <[email protected]>1 parent 8cf0b93 commit db7f92a
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
906 | 914 | | |
907 | | - | |
908 | | - | |
| 915 | + | |
| 916 | + | |
909 | 917 | | |
| 918 | + | |
910 | 919 | | |
911 | 920 | | |
912 | 921 | | |
913 | 922 | | |
914 | 923 | | |
915 | 924 | | |
| 925 | + | |
916 | 926 | | |
917 | 927 | | |
918 | 928 | | |
| |||
921 | 931 | | |
922 | 932 | | |
923 | 933 | | |
924 | | - | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
925 | 940 | | |
926 | 941 | | |
927 | 942 | | |
| |||
0 commit comments