aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index b58ba7d127e0..49fa0127a330 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1373,7 +1373,11 @@ static void zap_process(struct task_struct *start)
1373 struct task_struct *t; 1373 struct task_struct *t;
1374 unsigned long flags; 1374 unsigned long flags;
1375 1375
1376 spin_lock_irqsave(&start->sighand->siglock, flags); 1376 /*
1377 * start->sighand can't disappear, but may be
1378 * changed by de_thread()
1379 */
1380 lock_task_sighand(start, &flags);
1377 start->signal->flags = SIGNAL_GROUP_EXIT; 1381 start->signal->flags = SIGNAL_GROUP_EXIT;
1378 start->signal->group_stop_count = 0; 1382 start->signal->group_stop_count = 0;
1379 1383
@@ -1386,7 +1390,7 @@ static void zap_process(struct task_struct *start)
1386 } 1390 }
1387 } while ((t = next_thread(t)) != start); 1391 } while ((t = next_thread(t)) != start);
1388 1392
1389 spin_unlock_irqrestore(&start->sighand->siglock, flags); 1393 unlock_task_sighand(start, &flags);
1390} 1394}
1391 1395
1392static void zap_threads(struct mm_struct *mm) 1396static void zap_threads(struct mm_struct *mm)
@@ -1404,7 +1408,7 @@ static void zap_threads(struct mm_struct *mm)
1404 complete(vfork_done); 1408 complete(vfork_done);
1405 } 1409 }
1406 1410
1407 read_lock(&tasklist_lock); 1411 rcu_read_lock();
1408 for_each_process(g) { 1412 for_each_process(g) {
1409 p = g; 1413 p = g;
1410 do { 1414 do {
@@ -1415,7 +1419,7 @@ static void zap_threads(struct mm_struct *mm)
1415 } 1419 }
1416 } while ((p = next_thread(p)) != g); 1420 } while ((p = next_thread(p)) != g);
1417 } 1421 }
1418 read_unlock(&tasklist_lock); 1422 rcu_read_unlock();
1419} 1423}
1420 1424
1421static void coredump_wait(struct mm_struct *mm) 1425static void coredump_wait(struct mm_struct *mm)