[lkml]   [2005]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: negative timeout can be set up by setsockopt system call
    On 11/4/05, Nish Aravamudan <>
    > In Ram's specific case, I think, the call path is sys_setsockopt() ->
    > sock_setsockopt() -> sock_set_timeout, which has a definition of:
    > static int sock_set_timeout(long *timeo_p, char __user *optval, int

    >> Exactly right.

    > Ram, what is the expected behavior of negative values in the timeval?
    > And what are you seeing happen right now?
    > As of 2.6.14, looks like we convert any non-zero values into jiffies
    > and store them in sk->sk_{rcv,snd}timeo...
    >> I don't see any problem from the kernel side but the application
    times out immediately causing certain failures as the schedule_timeout
    returns immediately in case of negative values. Shouldn't there be a
    check for negative values and return error to the application so that
    it can handle it.

    - Show quoted text -

    > This could be, and I think is what Ram was asking about -- I've asked
    > for some clarification.
    > Thanks,
    > Nish

    Ram Gupta

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-11-07 15:45    [W:0.019 / U:10.632 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site