git: drm: Use the ERESTARTSYS error code

Francois Tigeot ftigeot at crater.dragonflybsd.org
Sun Nov 16 14:39:29 PST 2014


commit 797013cfbc62bad83a82eef6ad5504d6797bd4f5
Author: François Tigeot <ftigeot at wolfpond.org>
Date:   Sun Nov 16 23:14:17 2014 +0100

    drm: Use the ERESTARTSYS error code
    
    * Linux kernel functions can return -ERESTARTSYS in some cases, a
      negative value indicating an error (typically -512)
    
    * Howewer, ERESTARTSYS was previously as ERESTART, itself defined
      as -1 in *BSD kernels
    
    * The -ERESTARTSYS return value thus was positive on the DragonFly
      kernel, potentially breaking various drm error checks.
    
    * Fix this issue by defining ERESTARTSYS separately
    
    Thanks-to: Imre Vadasz for discovering the original problem

Summary of changes:
 sys/dev/drm/i915/i915_gem.c                  |  2 +-
 sys/dev/drm/include/drm/drm_os_linux.h       |  1 -
 sys/dev/drm/include/linux/completion.h       |  2 +-
 sys/dev/drm/include/linux/{pci.h => errno.h} | 12 ++++++------
 sys/dev/drm/radeon/radeon_gem.c              |  2 +-
 sys/dev/drm/ttm/ttm_bo.c                     | 19 +++++++++----------
 sys/dev/drm/ttm/ttm_bo_vm.c                  |  3 ++-
 sys/dev/drm/ttm/ttm_lock.c                   |  4 ++--
 8 files changed, 22 insertions(+), 23 deletions(-)
 copy sys/dev/drm/include/linux/{pci.h => errno.h} (88%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/797013cfbc62bad83a82eef6ad5504d6797bd4f5


-- 
DragonFly BSD source repository



More information about the Commits mailing list