Commit 4c917ba9 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

[PATCH] fix task_struct leak in posix-timers

timer_create leaks task_structs.  I probably introduced this bug when I did
the cleanup making posix-timers properly per-process.  This patch fixes it.

There is also a fixup for a random indentation snafu at the end.
Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 41e4f3d8
...@@ -655,6 +655,7 @@ sys_timer_create(clockid_t which_clock, ...@@ -655,6 +655,7 @@ sys_timer_create(clockid_t which_clock,
list_add(&new_timer->list, list_add(&new_timer->list,
&process->signal->posix_timers); &process->signal->posix_timers);
spin_unlock_irqrestore(&process->sighand->siglock, flags); spin_unlock_irqrestore(&process->sighand->siglock, flags);
if (new_timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID))
get_task_struct(process); get_task_struct(process);
} else { } else {
spin_unlock_irqrestore(&process->sighand->siglock, flags); spin_unlock_irqrestore(&process->sighand->siglock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment