lkml.org 
[lkml]   [2008]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/5] hrtimer_nanosleep: use -EINTR, not -ERESTARTNOHAND
    hrtimer_nanosleep:

    /* Absolute timers do not update the rmtp value and restart: */
    return -ERESTARTNOHAND;

    This is not right, -ERESTARTNOHAND means we will do restart if there is no
    in fact pending signal, and worse, this restart will use the same unchanged
    "__user *rmtp" parameter.

    Use -EINTR instead.

    Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

    --- MM/kernel/hrtimer.c~HRT_RMTP~ 2008-01-27 17:07:39.000000000 +0300
    +++ MM/kernel/hrtimer.c~HRT_RMTP 2008-02-01 13:43:52.000000000 +0300
    @@ -1359,7 +1359,7 @@ long hrtimer_nanosleep(struct timespec *

    /* Absolute timers do not update the rmtp value and restart: */
    if (mode == HRTIMER_MODE_ABS)
    - return -ERESTARTNOHAND;
    + return -EINTR;

    if (rmtp) {
    rem = ktime_sub(t.timer.expires, t.timer.base->get_time());


    \
     
     \ /
      Last update: 2008-02-01 14:39    [W:0.023 / U:65.332 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site