While detaching a device, make sure the debugfs_root of client
is marked as NULL. In case the device re-attaches itself with SMMU,
the stale pointer from debugfs_root will be used to create debugfs
and can cause kernel panic.
Bug
1546169
Bug
200031739
Change-Id: If0f58e4106ca2fe4b761c7fe185b17272824f76d
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/486335
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
list_for_each_entry(c, &as->client, list) {
if (c->dev == dev) {
debugfs_remove_recursive(c->debugfs_root);
+ c->debugfs_root = NULL;
list_del(&c->list);
smmu_client_disable_hwgrp(c);
dev_dbg(smmu->dev,