[lkml]   [2008]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/3] posix-timers: don't switch to ->group_leader if ->it_process dies
    On 08/03, Roland McGrath wrote:
    > The key thing that the old code does it to drop the ref to the old task as
    > soon as it notices.

    I thought about this too. But, again, this doesn't actually work. And it is
    very easy to pin the dead task_struct. The user can just create the
    SIGEV_THREAD_ID timer and kill the sub-thread (->it_process). Without
    calling timer_settime() the timer can't notice the death.

    (just in case, please note that the next patch doesn't make things worse,
    when ->group_leader dies the timer should be destroyed soon).

    > It may be worthwhile to do that in the case where
    > send_sigqueue fails.

    I think it is better to convert the posix timers to use "struct pid*" instead
    of "struct task_struct*". This change looks more or less straightforward, and
    it should fix the problem.


     \ /
      Last update: 2008-08-04 13:23    [W:0.049 / U:13.564 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site