Hi Suzuki,
On Wed, Jul 22, 2020 at 11:49:48AM +0100, Suzuki K Poulose wrote:
Hi Tingwei,
On 07/17/2020 06:45 AM, Tingwei Zhang wrote:
When coresight device is in an active session, driver module of that device should not be removed. Use try_get_module() in coresight_grab_device() to prevent module to be unloaded.
Is this really sufficient ? AFAIU, a device could be removed, but the module may still be alive due to the refcount on the module. This
If I understand correctly you are worried about cases where drivers would be removed but not the reference of the devices using those drivers in the coresight port connections? If so you are very right. Otherwise please expand on the scenario you have in mind.
The first version of this set was doing all that cleanup... I haven't looked at this set yet but from what I've seen the cleanup code is not present in any of the sets after V1. Tingwei, is the work done in coresight_disable_match() part of the later revisions?
could imply that we have stale pointers in the _path_, which could lead to corruption elsewhere. Should we do a get/put_device() instead ?
Cheers Suzuki