diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-cpu-timers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index ad85d3f0dcc4..7a51a5597c33 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -424,6 +424,7 @@ static void cleanup_timers(struct list_head *head, | |||
424 | cputime_t ptime = cputime_add(utime, stime); | 424 | cputime_t ptime = cputime_add(utime, stime); |
425 | 425 | ||
426 | list_for_each_entry_safe(timer, next, head, entry) { | 426 | list_for_each_entry_safe(timer, next, head, entry) { |
427 | put_task_struct(timer->task); | ||
427 | timer->task = NULL; | 428 | timer->task = NULL; |
428 | list_del_init(&timer->entry); | 429 | list_del_init(&timer->entry); |
429 | if (cputime_lt(timer->expires.cpu, ptime)) { | 430 | if (cputime_lt(timer->expires.cpu, ptime)) { |
@@ -436,6 +437,7 @@ static void cleanup_timers(struct list_head *head, | |||
436 | 437 | ||
437 | ++head; | 438 | ++head; |
438 | list_for_each_entry_safe(timer, next, head, entry) { | 439 | list_for_each_entry_safe(timer, next, head, entry) { |
440 | put_task_struct(timer->task); | ||
439 | timer->task = NULL; | 441 | timer->task = NULL; |
440 | list_del_init(&timer->entry); | 442 | list_del_init(&timer->entry); |
441 | if (cputime_lt(timer->expires.cpu, utime)) { | 443 | if (cputime_lt(timer->expires.cpu, utime)) { |
@@ -448,6 +450,7 @@ static void cleanup_timers(struct list_head *head, | |||
448 | 450 | ||
449 | ++head; | 451 | ++head; |
450 | list_for_each_entry_safe(timer, next, head, entry) { | 452 | list_for_each_entry_safe(timer, next, head, entry) { |
453 | put_task_struct(timer->task); | ||
451 | timer->task = NULL; | 454 | timer->task = NULL; |
452 | list_del_init(&timer->entry); | 455 | list_del_init(&timer->entry); |
453 | if (timer->expires.sched < sched_time) { | 456 | if (timer->expires.sched < sched_time) { |