lkml.org 
[lkml]   [2010]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] posix_timer: fix error path in timer_create
On 05/17/2010 06:31 PM, Stanislaw Gruszka wrote:
> On Mon, 17 May 2010 17:41:43 +0400
> Andrey Vagin<avagin@openvz.org> wrote:
>
>
>> @@ -593,6 +585,14 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
>> new_timer->sigq->info.si_tid = new_timer->it_id;
>> new_timer->sigq->info.si_code = SI_TIMER;
>>
>> + it_id_set = IT_ID_SET;
>> + new_timer->it_id = (timer_t) new_timer_id;
>>
> This part should not be moved, this make possible leak of idr entry .
>
You are right. Pls, skip this patches too.
>
>> + new_timer->it_clock = which_clock;
>> + new_timer->it_overrun = -1;
>>
> I'm not so convenient of moving this as well.
>
>
>> + error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer));
>> + if (error)
>> + goto out;
>> +
>> spin_lock_irq(&current->sighand->siglock);
>> new_timer->it_signal = current->signal;
>> list_add(&new_timer->list,&current->signal->posix_timers);
>>
> Thanks
> Stanislaw
>



\
 
 \ /
  Last update: 2010-05-17 16:57    [W:0.282 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site