Skip to content

Commit e852c2c

Browse files
ausyskingregkh
authored andcommitted
mei: bus: don't clean driver pointer
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/[email protected]/ Cc: <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b037d60 commit e852c2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/misc/mei/bus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,8 @@ static int mei_cl_device_remove(struct device *dev)
745745

746746
mei_cl_bus_module_put(cldev);
747747
module_put(THIS_MODULE);
748-
dev->driver = NULL;
749-
return ret;
750748

749+
return ret;
751750
}
752751

753752
static ssize_t name_show(struct device *dev, struct device_attribute *a,

0 commit comments

Comments
 (0)