Hello Michel Dänzer,

This is a semi-automatic email about new static checker warnings.

The patch d936622c3627: "drm/radeon: Only warn if the intra-domain 
offset actually exceeds the limit." from Mar 28, 2012, leads to the 
following Smatch complaint:

drivers/gpu/drm/radeon/radeon_object.c:244 radeon_bo_pin_restricted()
         error: we previously assumed 'gpu_addr' could be null (see line 234)

drivers/gpu/drm/radeon/radeon_object.c
   233                  bo->pin_count++;
   234                  if (gpu_addr)
                            ^^^^^^^^
Old check.

   235                          *gpu_addr = radeon_bo_gpu_offset(bo);
   236  
   237                  if (max_offset != 0) {
   238                          u64 domain_start;
   239  
   240                          if (domain == RADEON_GEM_DOMAIN_VRAM)
   241                                  domain_start = bo->rdev->mc.vram_start;
   242                          else
   243                                  domain_start = bo->rdev->mc.gtt_start;
   244                          WARN_ON_ONCE((*gpu_addr - domain_start) > 
max_offset);
                                              ^^^^^^^^^
New dereference.

   245                  }
   246  

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to