Hello, After the discussion around epoll() timeout, I noticed that the functions used to detect the timeout could themselves overflow for some values of HZ. So I decided to fix them by defining a macro which represents the maximal acceptable argument which is guaranteed not to overflow. As an added bonus, those functions can now be used in poll() and ep_poll() and remove the divide if HZ == 1000, or replace it with a shift if (1000 % HZ) or (HZ % 1000) is a power of two. Patches against 2.6.14-rc2-mm1 sent as replies to this mail. Regards, Willy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 0/3] fixes for overflow in poll(), epoll(), and msec_to_jiffies()
- From: Nishanth Aravamudan <[email protected]>
- Re: [PATCH 0/3] fixes for overflow in poll(), epoll(), and msec_to_jiffies()
- From: Davide Libenzi <[email protected]>
- [PATCH 3/3] 2.6.14-rc2-mm1 : fixes for overflow in sys_poll()
- From: Willy Tarreau <[email protected]>
- [PATCH 2/3] 2.6.14-rc2-mm1: fixes for overflow in epoll()
- From: Willy Tarreau <[email protected]>
- [PATCH 1/3] 2.6.14-rc2-mm1: fixes for overflow msec_to_jiffies()
- From: Willy Tarreau <[email protected]>
- Re: [PATCH 0/3] fixes for overflow in poll(), epoll(), and msec_to_jiffies()
- References:
- [patch] sys_epoll_wait() timeout saga ...
- From: Davide Libenzi <[email protected]>
- Re: [patch] sys_epoll_wait() timeout saga ...
- From: Willy Tarreau <[email protected]>
- Re: [patch] sys_epoll_wait() timeout saga ...
- From: Nish Aravamudan <[email protected]>
- Re: [patch] sys_epoll_wait() timeout saga ...
- From: Willy Tarreau <[email protected]>
- Re: [patch] sys_epoll_wait() timeout saga ...
- From: Nishanth Aravamudan <[email protected]>
- Re: [patch] sys_epoll_wait() timeout saga ...
- From: Davide Libenzi <[email protected]>
- [patch] sys_epoll_wait() timeout saga ...
- Prev by Date: Re: Supporting ACPI drive hotswap
- Next by Date: Re: Supporting ACPI drive hotswap
- Previous by thread: Re: [patch] sys_epoll_wait() timeout saga ...
- Next by thread: [PATCH 1/3] 2.6.14-rc2-mm1: fixes for overflow msec_to_jiffies()
- Index(es):