diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2020-06-29 01:53:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-22 10:22:27 +0300 |
commit | 0e184d12ac03b8432e7c68afdcd68fa95e1050bb (patch) | |
tree | fbbb0b52eab667087aa4066df79f9a3735f03223 /drivers | |
parent | 5cd9ec70b9f6431fc3e60075c01bc00f08c5606b (diff) | |
download | linux-0e184d12ac03b8432e7c68afdcd68fa95e1050bb.tar.xz |
mei: bus: don't clean driver pointer
commit e852c2c251ed9c23ae6e3efebc5ec49adb504207 upstream.
It's not needed to set driver to NULL in mei_cl_device_remove()
which is bus_type remove() handler as this is done anyway
in __device_release_driver().
Actually this is causing an endless loop in driver_detach()
on ubuntu patched kernel, while removing (rmmod) the mei_hdcp module.
The reason list_empty(&drv->p->klist_devices.k_list) is always not-empty.
as the check is always true in __device_release_driver()
if (dev->driver != drv)
return;
The non upstream patch is causing this behavior, titled:
'vfio -- release device lock before userspace requests'
Nevertheless the fix is correct also for the upstream.
Link: https://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20180912085046.3401-2-apw@canonical.com/
Cc: <stable@vger.kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20200628225359.2185929-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/mei/bus.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 8f6ab516041b..73a93e3fc18d 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -722,9 +722,8 @@ static int mei_cl_device_remove(struct device *dev) mei_cldev_unregister_callbacks(cldev); module_put(THIS_MODULE); - dev->driver = NULL; - return ret; + return ret; } static ssize_t name_show(struct device *dev, struct device_attribute *a, |