As kmalloc is allowed to block (if given the right flags), mark up the
two i915_sw_fence routines that may call kmalloc as potential sleeping
routines.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171212180652.22061-1-chris@chris-wilson.co.uk
        int pending;
 
        debug_fence_assert(fence);
+       might_sleep_if(gfpflags_allow_blocking(gfp));
 
        if (i915_sw_fence_done(signaler))
                return 0;
        int ret;
 
        debug_fence_assert(fence);
+       might_sleep_if(gfpflags_allow_blocking(gfp));
 
        if (dma_fence_is_signaled(dma))
                return 0;
        int ret = 0, pending;
 
        debug_fence_assert(fence);
+       might_sleep_if(gfpflags_allow_blocking(gfp));
 
        if (write) {
                struct dma_fence **shared;