|
@@ -923,7 +923,9 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs(
|
|
|
struct ecryptfs_global_auth_tok *global_auth_tok;
|
|
|
int rc = 0;
|
|
|
|
|
|
+ mutex_lock(&crypt_stat->keysig_list_mutex);
|
|
|
mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
|
|
|
+
|
|
|
list_for_each_entry(global_auth_tok,
|
|
|
&mount_crypt_stat->global_auth_tok_list,
|
|
|
mount_crypt_stat_list) {
|
|
@@ -932,13 +934,13 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs(
|
|
|
rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig);
|
|
|
if (rc) {
|
|
|
printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc);
|
|
|
- mutex_unlock(
|
|
|
- &mount_crypt_stat->global_auth_tok_list_mutex);
|
|
|
goto out;
|
|
|
}
|
|
|
}
|
|
|
- mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
|
|
|
+
|
|
|
out:
|
|
|
+ mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
|
|
|
+ mutex_unlock(&crypt_stat->keysig_list_mutex);
|
|
|
return rc;
|
|
|
}
|
|
|
|