re: drm/nouveau: fix locking issues in page flipping paths

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

 



Hello Ben Skeggs,

The patch 060810d7abaa: "drm/nouveau: fix locking issues in page 
flipping paths" from Jul 8, 2013, leads to the following Smatch warning:
"drivers/gpu/drm/nouveau/nouveau_display.c:599 
nouveau_crtc_page_flip()
	 error: double unlock 'mutex:&chan->cli->mutex'"

drivers/gpu/drm/nouveau/nouveau_display.c
   582          ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence);
   583          mutex_unlock(&chan->cli->mutex);
                ^^^^^^^^^^^^
Unlock.

   584          if (ret)
   585                  goto fail_unreserve;
   586  
   587          /* Update the crtc struct and cleanup */
   588          crtc->fb = fb;
   589  
   590          ttm_eu_fence_buffer_objects(&ticket, &res, fence);
   591          if (old_bo != new_bo)
   592                  nouveau_bo_unpin(old_bo);
   593          nouveau_fence_unref(&fence);
   594          return 0;
   595  
   596  fail_unreserve:
   597          ttm_eu_backoff_reservation(&ticket, &res);
   598  fail_unpin:
   599          mutex_unlock(&chan->cli->mutex);
                ^^^^^^^^^^^^
Second unlock.

   600          if (old_bo != new_bo)
   601                  nouveau_bo_unpin(new_bo);

This looks simple enough to fix, but the previous two attempts at fixing
the locking here have scared me a little.  ;)

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