diff options
Diffstat (limited to 'kernel/posix-cpu-timers.c')
-rw-r--r-- | kernel/posix-cpu-timers.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 383ba22f0b62..ea1aca5e7c2b 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -1293,30 +1293,30 @@ void run_posix_cpu_timers(struct task_struct *tsk) | |||
1293 | 1293 | ||
1294 | #undef UNEXPIRED | 1294 | #undef UNEXPIRED |
1295 | 1295 | ||
1296 | BUG_ON(tsk->exit_state); | ||
1297 | |||
1296 | /* | 1298 | /* |
1297 | * Double-check with locks held. | 1299 | * Double-check with locks held. |
1298 | */ | 1300 | */ |
1299 | read_lock(&tasklist_lock); | 1301 | read_lock(&tasklist_lock); |
1300 | if (likely(tsk->signal != NULL)) { | 1302 | spin_lock(&tsk->sighand->siglock); |
1301 | spin_lock(&tsk->sighand->siglock); | ||
1302 | 1303 | ||
1303 | /* | 1304 | /* |
1304 | * Here we take off tsk->cpu_timers[N] and tsk->signal->cpu_timers[N] | 1305 | * Here we take off tsk->cpu_timers[N] and tsk->signal->cpu_timers[N] |
1305 | * all the timers that are firing, and put them on the firing list. | 1306 | * all the timers that are firing, and put them on the firing list. |
1306 | */ | 1307 | */ |
1307 | check_thread_timers(tsk, &firing); | 1308 | check_thread_timers(tsk, &firing); |
1308 | check_process_timers(tsk, &firing); | 1309 | check_process_timers(tsk, &firing); |
1309 | 1310 | ||
1310 | /* | 1311 | /* |
1311 | * We must release these locks before taking any timer's lock. | 1312 | * We must release these locks before taking any timer's lock. |
1312 | * There is a potential race with timer deletion here, as the | 1313 | * There is a potential race with timer deletion here, as the |
1313 | * siglock now protects our private firing list. We have set | 1314 | * siglock now protects our private firing list. We have set |
1314 | * the firing flag in each timer, so that a deletion attempt | 1315 | * the firing flag in each timer, so that a deletion attempt |
1315 | * that gets the timer lock before we do will give it up and | 1316 | * that gets the timer lock before we do will give it up and |
1316 | * spin until we've taken care of that timer below. | 1317 | * spin until we've taken care of that timer below. |
1317 | */ | 1318 | */ |
1318 | spin_unlock(&tsk->sighand->siglock); | 1319 | spin_unlock(&tsk->sighand->siglock); |
1319 | } | ||
1320 | read_unlock(&tasklist_lock); | 1320 | read_unlock(&tasklist_lock); |
1321 | 1321 | ||
1322 | /* | 1322 | /* |