Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2/ttm Pull up following revision(s) (...
details: https://anonhg.NetBSD.org/src/rev/3600a5cc867a
branches: netbsd-7
changeset: 799508:3600a5cc867a
user: snj <snj%NetBSD.org@localhost>
date: Thu Jul 30 15:29:25 2015 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #894):
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revisions 1.9, 1.10
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.
--
ttm_bo_unreserve in case of ttm_bo_uvm_fault_idle restart.
Better chance of fixing PR kern/49862 by avoiding leaking a buffer
ww_mutex lock.
diffstat:
sys/external/bsd/drm2/ttm/ttm_bo_vm.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r b769b4766295 -r 3600a5cc867a sys/external/bsd/drm2/ttm/ttm_bo_vm.c
--- a/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Thu Jul 30 15:21:50 2015 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Thu Jul 30 15:29:25 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttm_bo_vm.c,v 1.2.4.5 2014/11/14 14:22:41 martin Exp $ */
+/* $NetBSD: ttm_bo_vm.c,v 1.2.4.6 2015/07/30 15:29:25 snj 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.2.4.5 2014/11/14 14:22:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.2.4.6 2015/07/30 15:29:25 snj Exp $");
#include <sys/types.h>
@@ -118,7 +118,7 @@
/* 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,14 +127,15 @@
if (ret) {
if (ret == -ERESTART)
ret = -EIO;
- goto out0;
+ goto out1;
}
}
ret = ttm_bo_uvm_fault_idle(bo, ufi);
if (ret) {
- /* Unlocks if it restarts. */
KASSERT(ret == -ERESTART);
+ /* ttm_bo_uvm_fault_idle calls uvmfault_unlockall for us. */
+ ttm_bo_unreserve(bo);
/* XXX errno Linux->NetBSD */
return -ret;
}
Home |
Main Index |
Thread Index |
Old Index