Comment 1 for bug 1893609

Revision history for this message
AaronMa (mapengyu) wrote : Re: System hang when stress S3 on radeon with TTM

After revert commit in Focal and oem-5.6, this issue can be fixed.

From b1cc82bb294939c76dc6b61146e960bd9f810222 Mon Sep 17 00:00:00 2001
From: Aaron Ma <email address hidden>
Date: Fri, 28 Aug 2020 11:03:46 +0800
Subject: [PATCH] Revert "UBUNTU: SAUCE: vfio -- release device lock before
 userspace requests"

This reverts part of commit 240766c8b029a4445f632f822a744c6ae34c48e3.

Part of changes break stress S3 test on ttm driver with radeon.

Error log:
[TTM] Erroneous page count. Leaking pages.

Signed-off-by: Aaron Ma <email address hidden>
---
 drivers/base/dd.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index b4f9e99f7372..b25bcab2a26b 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -1135,13 +1135,6 @@ static void __device_release_driver(struct device *dev, struct device *parent)
                        dev->bus->remove(dev);
                else if (drv->remove)
                        drv->remove(dev);
- /*
- * A concurrent invocation of the same function might
- * have released the driver successfully while this one
- * was waiting, so check for that.
- */
- if (dev->driver != drv)
- return;

                device_links_driver_cleanup(dev);

--