aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/gc.c')
-rw-r--r--security/tomoyo/gc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index d9ad35bc7fa8..245bf422e3a5 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -151,7 +151,8 @@ static void tomoyo_del_name(const struct tomoyo_name_entry *ptr)
151 151
152static void tomoyo_collect_entry(void) 152static void tomoyo_collect_entry(void)
153{ 153{
154 mutex_lock(&tomoyo_policy_lock); 154 if (mutex_lock_interruptible(&tomoyo_policy_lock))
155 return;
155 { 156 {
156 struct tomoyo_globally_readable_file_entry *ptr; 157 struct tomoyo_globally_readable_file_entry *ptr;
157 list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list, 158 list_for_each_entry_rcu(ptr, &tomoyo_globally_readable_list,
@@ -275,8 +276,6 @@ static void tomoyo_collect_entry(void)
275 break; 276 break;
276 } 277 }
277 } 278 }
278 mutex_unlock(&tomoyo_policy_lock);
279 mutex_lock(&tomoyo_name_list_lock);
280 { 279 {
281 int i; 280 int i;
282 for (i = 0; i < TOMOYO_MAX_HASH; i++) { 281 for (i = 0; i < TOMOYO_MAX_HASH; i++) {
@@ -294,7 +293,7 @@ static void tomoyo_collect_entry(void)
294 } 293 }
295 } 294 }
296 } 295 }
297 mutex_unlock(&tomoyo_name_list_lock); 296 mutex_unlock(&tomoyo_policy_lock);
298} 297}
299 298
300static void tomoyo_kfree_entry(void) 299static void tomoyo_kfree_entry(void)