mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Nish Aravamudan <nish.aravamudan@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [patch] Make epoll_wait() handle negative timeouts as MAX_SCHEDULE_TIMEOUT ...
Date: Fri, 23 Sep 2005 11:04:05 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0509231055260.10222@localhost.localdomain> (raw)
In-Reply-To: <29495f1d0509231042139e9b94@mail.gmail.com>

On Fri, 23 Sep 2005, Nish Aravamudan wrote:

> On 9/23/05, Davide Libenzi <davidel@xmailserver.org> wrote:
>>
>> As reported by Vadim Lobanov, epoll_wait() did not handle correctly
>> timeouts <0 (only the -1 case was MAX_SCHEDULE_TIMEOUT'd).
>>
>>
>> Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
>
> Arrgggh, this is as wrong as sys_poll() was before! :)
>
> --- a/fs/eventpoll.c	2005-09-23 10:06:45.000000000 -0700
> +++ b/fs/eventpoll.c	2005-09-23 10:09:35.000000000 -0700
> @@ -1507,7 +1507,7 @@
> 	 * and the overflow condition. The passed timeout is in milliseconds,
> 	 * that why (t * HZ) / 1000.
> 	 */
> -	jtimeout = timeout == -1 || timeout > (MAX_SCHEDULE_TIMEOUT - 1000) / HZ ?
> +	jtimeout = timeout < 0 || timeout > (MAX_SCHEDULE_TIMEOUT - 1000) / HZ ?
>
> @timeout is in miliseconds, per the comment, yes? If so, then
>
> timeout [msecs] > MAX_SCHEDULE_TIMEOUT [jiffies] - 1000 [jiffies] / HZ
> [jiffies / sec]

Sh*t, you're right! Reposting soon.


- Davide



      reply	other threads:[~2005-09-23 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 17:37 Davide Libenzi
2005-09-23 17:42 ` Nish Aravamudan
2005-09-23 18:04   ` Davide Libenzi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0509231055260.10222@localhost.localdomain \
    --to=davidel@xmailserver.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nish.aravamudan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®