• Daniel Vetter's avatar
    drm/i915: Use kcalloc more · a1e22653
    Daniel Vetter authored
    No buffer overflows here, but better safe than sorry.
    
    v2:
    - Fixup the sizeof conversion, I've missed the pointer deref (Jani).
    - Drop the redundant GFP_ZERO, kcalloc alreads memsets (Jani).
    - Use kmalloc_array for the execbuf fastpath to avoid the memset
      (Chris). I've opted to leave all other conversions as-is since they
      aren't in a fastpath and dealing with cleared memory instead of
      random garbage is just generally nicer.
    
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    [danvet: Drop the contentious kmalloc_array hunk in execbuf.]
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    a1e22653
i915_gem_tiling.c 16.2 KB