Commit 5aa0ab0
drm/xe: Don't allow evicting of BOs in same VM in array of VM binds
[ Upstream commit 7ac74613e5f2ef3450f44fd2127198662c2563a9 ]
An array of VM binds can potentially evict other buffer objects (BOs)
within the same VM under certain conditions, which may lead to NULL
pointer dereferences later in the bind pipeline. To prevent this, clear
the allow_res_evict flag in the xe_bo_validate call.
v2:
- Invert polarity of no_res_evict (Thomas)
- Add comment in code explaining issue (Thomas)
Cc: [email protected]
Reported-by: Paulo Zanoni <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6268
Fixes: 774b5fa ("drm/xe: Avoid evicting object of the same vm in none fault mode")
Fixes: 77f2ef3 ("drm/xe: Lock all gpuva ops during VM bind IOCTL")
Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <[email protected]>
Tested-by: Paulo Zanoni <[email protected]>
Reviewed-by: Thomas Hellström <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
(cherry picked from commit 8b9ba8d6d95fe75fed6b0480bb03da4b321bea08)
Signed-off-by: Lucas De Marchi <[email protected]>
[ removed exec parameter from xe_bo_validate() calls ]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 21723da commit 5aa0ab0
2 files changed
Lines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2894 | 2894 | | |
2895 | 2895 | | |
2896 | 2896 | | |
2897 | | - | |
| 2897 | + | |
2898 | 2898 | | |
2899 | 2899 | | |
2900 | 2900 | | |
| |||
2905 | 2905 | | |
2906 | 2906 | | |
2907 | 2907 | | |
2908 | | - | |
| 2908 | + | |
| 2909 | + | |
2909 | 2910 | | |
2910 | 2911 | | |
2911 | 2912 | | |
| |||
2978 | 2979 | | |
2979 | 2980 | | |
2980 | 2981 | | |
2981 | | - | |
| 2982 | + | |
2982 | 2983 | | |
2983 | 2984 | | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
2984 | 2993 | | |
2985 | 2994 | | |
2986 | 2995 | | |
2987 | 2996 | | |
2988 | 2997 | | |
| 2998 | + | |
2989 | 2999 | | |
2990 | 3000 | | |
2991 | 3001 | | |
| |||
2996 | 3006 | | |
2997 | 3007 | | |
2998 | 3008 | | |
2999 | | - | |
| 3009 | + | |
3000 | 3010 | | |
3001 | | - | |
| 3011 | + | |
| 3012 | + | |
3002 | 3013 | | |
3003 | | - | |
| 3014 | + | |
| 3015 | + | |
3004 | 3016 | | |
3005 | 3017 | | |
3006 | 3018 | | |
| |||
3009 | 3021 | | |
3010 | 3022 | | |
3011 | 3023 | | |
3012 | | - | |
| 3024 | + | |
3013 | 3025 | | |
3014 | 3026 | | |
3015 | 3027 | | |
| |||
3025 | 3037 | | |
3026 | 3038 | | |
3027 | 3039 | | |
3028 | | - | |
| 3040 | + | |
3029 | 3041 | | |
3030 | 3042 | | |
3031 | 3043 | | |
| |||
3069 | 3081 | | |
3070 | 3082 | | |
3071 | 3083 | | |
3072 | | - | |
| 3084 | + | |
3073 | 3085 | | |
3074 | 3086 | | |
3075 | 3087 | | |
| |||
3698 | 3710 | | |
3699 | 3711 | | |
3700 | 3712 | | |
| 3713 | + | |
| 3714 | + | |
3701 | 3715 | | |
3702 | 3716 | | |
3703 | 3717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
0 commit comments