From 23a870c98da52254d4802c3192be276fb750f565 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Wed, 25 Jan 2012 22:57:37 -0800 Subject: security: trusted foundations: fix coarse_page_table_array init On the first allocation of a coarse page array, explicitly set the ref_count to 1, rather than incrementing (as the allocator used may not guarantee a zero initted struct). Bug 928289 Signed-off-by: Chris Johnson Reviewed-on: http://git-master/r/77514 (cherry picked from commit 7329d105883f8b5db87a45085cf6c47c234c4126) Change-Id: Ic33eecfaf0620340dd430dfa43793fbf0bd8ad8f Signed-off-by: Pritesh Raithatha Reviewed-on: http://git-master/r/79998 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani --- security/tf_driver/tf_comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security') diff --git a/security/tf_driver/tf_comm.c b/security/tf_driver/tf_comm.c index 8b12f293eabf..16915beb406d 100644 --- a/security/tf_driver/tf_comm.c +++ b/security/tf_driver/tf_comm.c @@ -236,7 +236,7 @@ struct tf_coarse_page_table *tf_alloc_coarse_page_table( */ coarse_pg_table = &(array->coarse_page_tables[i]); - array->ref_count++; + array->ref_count = 1; } else { /* * The other elements are added to the free list -- cgit v1.2.3