lkml.org 
[lkml]   [1999]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [NEW PATCH] POSIX timers for 2.3.26
Date
From
> 
> + memset (&tes, 0, sizeof(tes));
> + if (get_user (tes.sigev_value.sival_int, &timer_event_spec->sigev_value.sival_int) ||
> + __get_user (tes.sigev_signo, &timer_event_spec->sigev_signo) ||

You cant do that one. Suppose the object is across a page boundary. You need
to check the address range first then use __get_user. In fact its probably
faster to memcpy the object from user into L1 cache then use it

> +asmlinkage int sys_timer_create(clockid_t which_clock,
> + struct sigevent *timer_event_spec,
> + timer_t *created_timer_id)

This one has races I think

> + timers = current->posix_timers = itimer_struct_new();

What if two threads sharing timers execute this at the same time. I suspect
you need to guard this with the tasklist lock perhaps ?

Also consider exec and a setuid program getting started with suprise signals
pending. I suspect execve needs to kill these timers ?


Alan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.080 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site