return -ENOMEM;
if (!is_delete)
entry = kmalloc(sizeof(*entry), GFP_NOFS);
- mutex_lock(&tomoyo_policy_lock);
+ if (mutex_lock_interruptible(&tomoyo_policy_lock))
+ goto out;
list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list, list) {
if (ptr->filename != saved_filename)
continue;
error = 0;
}
mutex_unlock(&tomoyo_policy_lock);
+ out:
tomoyo_put_name(saved_filename);
kfree(entry);
return error;
goto out;
if (!is_delete)
entry = kmalloc(sizeof(*entry), GFP_NOFS);
- mutex_lock(&tomoyo_policy_lock);
+ if (mutex_lock_interruptible(&tomoyo_policy_lock))
+ goto out;
list_for_each_entry_rcu(ptr, &tomoyo_pattern_list, list) {
if (saved_pattern != ptr->pattern)
continue;
return error;
if (!is_delete)
entry = kmalloc(sizeof(*entry), GFP_NOFS);
- mutex_lock(&tomoyo_policy_lock);
+ if (mutex_lock_interruptible(&tomoyo_policy_lock))
+ goto out;
list_for_each_entry_rcu(ptr, &tomoyo_no_rewrite_list, list) {
if (ptr->pattern != saved_pattern)
continue;
error = 0;
}
mutex_unlock(&tomoyo_policy_lock);
+ out:
tomoyo_put_name(saved_pattern);
kfree(entry);
return error;
return -ENOMEM;
if (!is_delete)
entry = kmalloc(sizeof(*entry), GFP_NOFS);
- mutex_lock(&tomoyo_policy_lock);
+ if (mutex_lock_interruptible(&tomoyo_policy_lock))
+ goto out;
list_for_each_entry_rcu(ptr, &domain->acl_info_list, list) {
struct tomoyo_path_acl *acl =
container_of(ptr, struct tomoyo_path_acl, head);
error = 0;
}
mutex_unlock(&tomoyo_policy_lock);
+ out:
kfree(entry);
tomoyo_put_name(saved_filename);
return error;
goto out;
if (!is_delete)
entry = kmalloc(sizeof(*entry), GFP_NOFS);
- mutex_lock(&tomoyo_policy_lock);
+ if (mutex_lock_interruptible(&tomoyo_policy_lock))
+ goto out;
list_for_each_entry_rcu(ptr, &domain->acl_info_list, list) {
struct tomoyo_path2_acl *acl =
container_of(ptr, struct tomoyo_path2_acl, head);