[Intel-gfx] [PATCH v2] drm/i915: Fixup userptr mmu notifier registration error handling

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Oct 18 09:39:06 UTC 2017


On 18/10/2017 10:07, Daniel Vetter wrote:
> On Tue, Oct 17, 2017 at 04:09:08PM +0100, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>
>> Avoid dereferencing the error pointer and also avoid returning NULL
>> from i915_mmu_notifier_find since the callers do not expect that.
> 
> How did my patch return a NULL value? At least I assume that's the reasonf
> for your v2 ...

The flow as I saw it was:

1. err = PTR_ERR
2. mn->mm == NULL
3. err = 0
4. return mm->mn

Which I okay-ed as well so a combined fail.

I pinged you on IRC and from your reply I understood you want me to send 
the patch I showed there, and don't want to bother thinking about it any 
longer.

Regards,

Tvrtko


More information about the Intel-gfx mailing list