summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2012-08-14 16:12:16 -0700
committerVarun Colbert <vcolbert@nvidia.com>2012-08-20 14:03:05 -0700
commit025c9a23a0b9c51931f440ba34bd1abeb8eb8909 (patch)
tree1a382da0549ae6e24ba188c4a79536103b7368fd /security
parent7d812d6276646a8d7f0bcbb8907a2a1a210985e1 (diff)
security: tf_driver: restore current task flags
In K3.1, this code was setting PF_FREEZER_NOSIG, which meant freeze_task would signal this thread to TIF_FREEZE later. In K3.4, PF_FREEZER_NOSIG was removed and the code ported to toggle PF_KTHREAD instead. But, in the port we missed restoring the previous task value (leaving PF_KTHREAD still set). Bug 988873 Change-Id: I1071ea33c08c64288162cd628977081a422c716f Signed-off-by: Chris Johnson <cwj@nvidia.com> Reviewed-on: http://git-master/r/123535 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karan Jhavar <kjhavar@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r--security/tf_driver/tf_comm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/tf_driver/tf_comm.c b/security/tf_driver/tf_comm.c
index c401cf870fcd..b3d58e202f4b 100644
--- a/security/tf_driver/tf_comm.c
+++ b/security/tf_driver/tf_comm.c
@@ -1405,6 +1405,11 @@ exit:
wait_prepared = false;
}
+#ifdef CONFIG_FREEZER
+ current->flags &= ~(PF_KTHREAD);
+ current->flags |= (saved_flags & PF_KTHREAD);
+#endif
+
return result;
}