summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2012-08-14 16:12:16 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:31:43 -0700
commit04c13f7b76ff163a704cdee8f38e7f8b9b53fd2e (patch)
tree81510023800c86c4ba4d41d8ab43f0018b9438f4 /security
parent1f43cde6f204cac44a123bcac271168014b8cec4 (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> Rebase-Id: R14cd172412d6b32840e81eeb76d08d62a4976f6a
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;
}