[PATCH] nouveau: Fix crash after D3

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

 



In 3.7-rc4, when starting X with the integrated GPU and suspending the discrete GPU,
after one or more 32-bit applications are used (eg Skype) and X is stopped,
we hit a panic.

Prevent this by testing if the fini function is valid.

Full panic bootlog is at: http://quora.org/2012/nouveau/dmesg-crash.txt
Xorg.log is at: http://quora.org/2012/nouveau/Xorg.0.log-crash.txt
Kernel log after fix is at: http://quora.org/2012/nouveau/dmesg-fix.txt

Signed-off-by: Daniel J Blueman <daniel@xxxxxxxxx>
---
 drivers/gpu/drm/nouveau/core/core/object.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/core/object.c b/drivers/gpu/drm/nouveau/core/core/object.c
index 0daab62..3da3525 100644
--- a/drivers/gpu/drm/nouveau/core/core/object.c
+++ b/drivers/gpu/drm/nouveau/core/core/object.c
@@ -354,12 +354,16 @@ static int
 nouveau_object_decf(struct nouveau_object *object)
 {
 	int ret;
+	struct nouveau_ofuncs *pfuncs;
 
 	nv_trace(object, "stopping...\n");
 
-	ret = nv_ofuncs(object)->fini(object, false);
-	if (ret)
-		nv_warn(object, "failed fini, %d\n", ret);
+	pfuncs = nv_ofuncs(object);
+	if (pfuncs->fini) {
+		ret = nv_ofuncs(object)->fini(object, false);
+		if (ret)
+			nv_warn(object, "failed fini, %d\n", ret);
+	}
 
 	if (object->engine) {
 		mutex_lock(&nv_subdev(object->engine)->mutex);
-- 
1.7.10.4

_______________________________________________
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