diff options
author | Chris Johnson <cwj@nvidia.com> | 2012-01-25 22:57:37 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-09 12:55:37 -0800 |
commit | 23a870c98da52254d4802c3192be276fb750f565 (patch) | |
tree | 3e0f9f78dababf0b63333db8c48cc61f4f36f2d2 /security/tf_driver | |
parent | 7498d01e42b54c56940bb6aa58aed7a69e69f958 (diff) |
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 <cwj@nvidia.com>
Reviewed-on: http://git-master/r/77514
(cherry picked from commit 7329d105883f8b5db87a45085cf6c47c234c4126)
Change-Id: Ic33eecfaf0620340dd430dfa43793fbf0bd8ad8f
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/79998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'security/tf_driver')
-rw-r--r-- | security/tf_driver/tf_comm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |