Commit 7ac7461
drm/xe: Don't allow evicting of BOs in same VM in array of VM binds
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: stable@vger.kernel.org
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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 <matthew.brost@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://lore.kernel.org/r/20251009110618.3481870-1-matthew.brost@intel.com
(cherry picked from commit 8b9ba8d)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>1 parent e5ae8d1 commit 7ac7461
2 files changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2832 | 2832 | | |
2833 | 2833 | | |
2834 | 2834 | | |
2835 | | - | |
| 2835 | + | |
2836 | 2836 | | |
2837 | 2837 | | |
2838 | 2838 | | |
| |||
2843 | 2843 | | |
2844 | 2844 | | |
2845 | 2845 | | |
2846 | | - | |
| 2846 | + | |
| 2847 | + | |
2847 | 2848 | | |
2848 | 2849 | | |
2849 | 2850 | | |
| |||
2913 | 2914 | | |
2914 | 2915 | | |
2915 | 2916 | | |
2916 | | - | |
| 2917 | + | |
2917 | 2918 | | |
2918 | 2919 | | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
2919 | 2928 | | |
2920 | 2929 | | |
2921 | 2930 | | |
2922 | 2931 | | |
2923 | 2932 | | |
| 2933 | + | |
2924 | 2934 | | |
2925 | 2935 | | |
2926 | 2936 | | |
| |||
2931 | 2941 | | |
2932 | 2942 | | |
2933 | 2943 | | |
2934 | | - | |
| 2944 | + | |
2935 | 2945 | | |
2936 | | - | |
| 2946 | + | |
| 2947 | + | |
2937 | 2948 | | |
2938 | | - | |
| 2949 | + | |
| 2950 | + | |
2939 | 2951 | | |
2940 | 2952 | | |
2941 | 2953 | | |
| |||
2944 | 2956 | | |
2945 | 2957 | | |
2946 | 2958 | | |
2947 | | - | |
| 2959 | + | |
2948 | 2960 | | |
2949 | 2961 | | |
2950 | 2962 | | |
| |||
2959 | 2971 | | |
2960 | 2972 | | |
2961 | 2973 | | |
2962 | | - | |
| 2974 | + | |
2963 | 2975 | | |
2964 | 2976 | | |
2965 | 2977 | | |
| |||
3005 | 3017 | | |
3006 | 3018 | | |
3007 | 3019 | | |
3008 | | - | |
| 3020 | + | |
3009 | 3021 | | |
3010 | 3022 | | |
3011 | 3023 | | |
| |||
3638 | 3650 | | |
3639 | 3651 | | |
3640 | 3652 | | |
| 3653 | + | |
| 3654 | + | |
3641 | 3655 | | |
3642 | 3656 | | |
3643 | 3657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
| |||
0 commit comments