drm/i915/selftests: Change priority overflow detection
Check for integer overflow in the priority chain, rather than against a type-constricted max-priority check. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200519063123.20673-2-chris@chris-wilson.co.uk
This commit is contained in:
Родитель
b86fc6e5e8
Коммит
ad6586850b
|
@ -2735,12 +2735,12 @@ static int live_preempt_gang(void *arg)
|
|||
/* Submit each spinner at increasing priority */
|
||||
engine->schedule(rq, &attr);
|
||||
|
||||
if (prio < attr.priority)
|
||||
break;
|
||||
|
||||
if (prio <= I915_PRIORITY_MAX)
|
||||
continue;
|
||||
|
||||
if (prio > (INT_MAX >> I915_USER_PRIORITY_SHIFT))
|
||||
break;
|
||||
|
||||
if (__igt_timeout(end_time, NULL))
|
||||
break;
|
||||
} while (1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче