Skip to content

Commit

Permalink
core: rpmb: fix mutex in directory populate
Browse files Browse the repository at this point in the history
Fix mutex unlocking in rpmb_fs_dir_populate() that should protect
fat_entry_dir_deinit() execution.

Fixes: 5f68d78 ("core: RPMB FS: Caching for FAT FS entries")
Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Jan 16, 2025
1 parent b8a9277 commit 2c5be90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tee/tee_rpmb_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2938,8 +2938,8 @@ static TEE_Result rpmb_fs_dir_populate(const char *path,
res = TEE_ERROR_ITEM_NOT_FOUND; /* No directories were found. */

out:
mutex_unlock(&rpmb_mutex);
fat_entry_dir_deinit();
mutex_unlock(&rpmb_mutex);
if (res)
rpmb_fs_dir_free(dir);

Expand Down

0 comments on commit 2c5be90

Please sign in to comment.