> +It is the responsibility of the consumer to make sure that the device or > +its resources are not in use by any process before attempting recovery. I'm not convinced this is actually doable in practice, outside of killing all apps that aren't the one trying to recover the GPU. Is this just about not crashing those processes if they don't handle GPU hotunplugs well, about leaks, or something else? > +With IOCTLs blocked and device already 'wedged', all device memory should > +be unmapped and file descriptors should be closed to prevent leaks. Afaiu from a userspace POV, a rebind is just like a GPU hotunplug + hotplug with matching "remove" and "add" udev events. As long as the application cleans up resources related to the device when it receives the event, there should be no leaks with a normal hotunplug... Is this different enough that we can't have the same expectations?