[bug report] drm/vmwgfx: Implement DRIVER_GEM

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

 



Hello Zack Rusin,

The patch 8afa13a0583f: "drm/vmwgfx: Implement DRIVER_GEM" from Dec
6, 2021, leads to the following Smatch static checker warning:

	drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:574 vmw_user_bo_synccpu_release()
	error: uninitialized symbol 'vmw_bo'.

drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
    564 static int vmw_user_bo_synccpu_release(struct drm_file *filp,
    565                                        uint32_t handle,
    566                                        uint32_t flags)
    567 {
    568         struct vmw_buffer_object *vmw_bo;
    569         int ret = vmw_user_bo_lookup(filp, handle, &vmw_bo);
                    ^^^^^
Can this fail?

    570 
    571         if (!(flags & drm_vmw_synccpu_allow_cs)) {
    572                 atomic_dec(&vmw_bo->cpu_writers);
    573         }
--> 574         ttm_bo_put(&vmw_bo->base);
                           ^^^^^^^^^^^^^
Smatch thinks it can fail.

    575 
    576         return ret;
    577 }

regards,
dan carpenter



[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