Module Name:    src
Committed By:   riastradh
Date:           Mon Jul 27 22:26:51 UTC 2015

Modified Files:
        src/sys/external/bsd/drm2/ttm: ttm_bo_vm.c

Log Message:
Fix error branch: ttm_bo_unreserve on failure after ttm_bo_reserve.

Tiny chance this will fix PR kern/49862 by not leaking a ww_mutex
lock.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c
diff -u src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.8 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.9
--- src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.8	Thu Nov  6 13:14:31 2014
+++ src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c	Mon Jul 27 22:26:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_vm.c,v 1.8 2014/11/06 13:14:31 riastradh Exp $	*/
+/*	$NetBSD: ttm_bo_vm.c,v 1.9 2015/07/27 22:26:50 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.8 2014/11/06 13:14:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.9 2015/07/27 22:26:50 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -118,7 +118,7 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u
 	/* drm prime buffers are not mappable.  XXX Catch this earlier?  */
 	if (bo->ttm && ISSET(bo->ttm->page_flags, TTM_PAGE_FLAG_SG)) {
 		ret = -EINVAL;
-		goto out0;
+		goto out1;
 	}
 
 	/* Notify the driver of a fault if it wants.  */
@@ -127,7 +127,7 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u
 		if (ret) {
 			if (ret == -ERESTART)
 				ret = -EIO;
-			goto out0;
+			goto out1;
 		}
 	}
 

Reply via email to