diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-25 19:41:41 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-26 18:22:08 (GMT) |
commit | 4d36a9e65d4966b433b2f3424d9457468bc80e00 (patch) | |
tree | 8c7b8e64ae40769a3f9f948491987ba93698ee3a /fs/eventpoll.c | |
parent | 44a504c405ae5c3a80e71acf71d6b1cb0db70715 (diff) | |
download | linux-fsl-qoriq-4d36a9e65d4966b433b2f3424d9457468bc80e00.tar.xz |
select: deal with math overflow from borderline valid userland data
Some userland apps seem to pass in a "0" for the seconds, and several
seconds worth of usecs to select(). The old kernels accepted this just
fine, so the new kernels must too.
However, due to the upscaling of the microseconds to nanoseconds we had
some cases where we got math overflow, and depending on the GCC version
(due to inlining decisions) that actually resulted in an -EINVAL return.
This patch fixes this by adding the excess microseconds to the seconds
field.
Also with thanks to Marcin Slusarz for spotting some implementation bugs
in the diagnostics patches.
Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/eventpoll.c')
0 files changed, 0 insertions, 0 deletions