[Intel-gfx] [PATCH 1/2] drm/i915: Check for scratch page scribbling
Mika Kuoppala
mika.kuoppala at linux.intel.com
Wed Feb 10 11:51:57 UTC 2021
Chris Wilson <chris at chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2021-02-10 10:49:55)
>> Chris Wilson <chris at chris-wilson.co.uk> writes:
>> > diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c
>> > index d34770ae4c9a..5ac9eb4a3a92 100644
>> > --- a/drivers/gpu/drm/i915/gt/intel_gtt.c
>> > +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
>> > @@ -158,10 +158,49 @@ static void poison_scratch_page(struct drm_i915_gem_object *scratch)
>> >
>> > vaddr = kmap(page);
>> > memset(vaddr, val, PAGE_SIZE);
>> > + set_page_dirty(page); /* keep the poisoned contents */
>>
>> Should we use locked version in here?
>
> We don't hold the page-lock here, so no. If this is not an anonymous
> page, something is very wrong :p
Cleared confusion in irc. We dont hold the lock and set_page_dirty dont
take it.
But this is anonymous page and we are sole user during poisoning.
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> -Chris
More information about the Intel-gfx
mailing list