Re: [drm-intel:for-linux-next 479/497] drivers/gpu/drm/i915/i915_gem_gtt.c:1086:26: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/6/2015 11:00 PM, Daniel Vetter wrote:
On Thu, Aug 6, 2015 at 10:17 PM, kbuild test robot
<fengguang.wu@xxxxxxxxx> wrote:
   1070          if (IS_ENABLED(CONFIG_X86_32))
   1071                  /* While we have a proliferation of size_t variables
   1072                   * we cannot represent the full ppgtt size on 32bit,
   1073                   * so limit it to the same size as the GGTT (currently
   1074                   * 2GiB).
   1075                   */
   1076                  ppgtt->base.total = to_i915(ppgtt->base.dev)->gtt.base.total;
   1077          ppgtt->base.cleanup = gen8_ppgtt_cleanup;
   1078          ppgtt->base.allocate_va_range = gen8_alloc_va_range;
   1079          ppgtt->base.insert_entries = gen8_ppgtt_insert_entries;
   1080          ppgtt->base.clear_range = gen8_ppgtt_clear_range;
   1081          ppgtt->base.unbind_vma = ppgtt_unbind_vma;
   1082          ppgtt->base.bind_vma = ppgtt_bind_vma;
   1083
   1084          ppgtt->switch_mm = gen8_mm_switch;
   1085
1086          ret = __pdp_init(false, &ppgtt->pdp);

So the first argument of pdp_init ist struct drm_device *dev and yes
the first thing it does is deref it.


*dev is used only for I915_PDPES_PER_PDP/USES_FULL_48BIT_PPGTT, which in this path is always false. I didn't expect kbuild to complain. I'll change it with the other modifications I'm about to send.

How exactly was this tested again?

Oh and the hunk right below with the CONFIG_X86_32 needs to got too -
if we're 48b safe then we should be 32b safe too ;-)

Yes, after the offset change it'll be completely safe. I left it in this patch as that was only moving code around.
I'll include a proper "revert-me" patch, saying why it is safe now.

-Michel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux