re: drm/gem: Check locking in drm_gem_object_unreference

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

 



Hello Daniel Vetter,

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

The patch 5771551c4877: "drm/gem: Check locking in 
drm_gem_object_unreference" from Oct 15, 2015, leads to the following 
Smatch complaint:

include/drm/drm_gem.h:147 drm_gem_object_unreference()
	 warn: variable dereferenced before check 'obj' (see line 145)

include/drm/drm_gem.h
   144	{
   145		WARN_ON(!mutex_is_locked(&obj->dev->struct_mutex));
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
deref.

   146	
   147		if (obj != NULL)

check.

   148			kref_put(&obj->refcount, drm_gem_object_free);
   149	}

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux