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;
After revert commit in Focal and oem-5.6, this issue can be fixed.
From b1cc82bb294939c 76dc6b61146e960 bd9f810222 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 240766c8b029a44 45f632f822a744c 6ae34c48e3.
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 .b25bcab2a26b 100644 release_ driver( struct device *dev, struct device *parent)
dev- >bus->remove( dev);
else if (drv->remove)
drv- >remove( dev);
index b4f9e99f7372.
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -1135,13 +1135,6 @@ static void __device_
- /*
- * 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;
--