[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F3602A9.3060206@akamai.com>
Date: Fri, 10 Feb 2012 23:54:49 -0600
From: Josh Hunt <johunt@...mai.com>
To: Al Viro <viro@...IV.linux.org.uk>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, arnd@...db.de, linux-arch@...r.kernel.org
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH v2] compat: poll() in 32-bit applications does not handle
negative timeout values properly on 64-bit kernels
We have hit an issue where our 32-bit applications using poll() and
passing in a value of -1 for the timeout value return after ~49 days
(2^32 msec), instead of waiting indefinitely. I've instrumented the
kernel and found we are hitting the case where poll() believes we've
passed in a positive number and thus creates a timespec, etc. I've
implemented compat_sys_poll() to sign-extend the timeout value and
resolve the issue.
There was an almost identical patch submitted last year, but for
whatever reason did not make it in:
https://lkml.org/lkml/2011/9/18/19
I am guessing there are other architectures affected by this bug. This
patch only fixes x86.
Josh
View attachment "compat-sys-poll.patch" of type "text/x-patch" (2340 bytes)
Powered by blists - more mailing lists