From 025c9a23a0b9c51931f440ba34bd1abeb8eb8909 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Tue, 14 Aug 2012 16:12:16 -0700 Subject: 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 Reviewed-on: http://git-master/r/123535 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karan Jhavar Reviewed-by: Yu-Huan Hsu --- security/tf_driver/tf_comm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'security') 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; } -- cgit v1.2.3