Title: [9736] trunk/fs/eventpoll.c: epoll: initialize slack for negative timeout values
- Revision
- 9736
- Author
- vapier
- Date
- 2011-03-18 04:36:02 -0400 (Fri, 18 Mar 2011)
Log Message
epoll: initialize slack for negative timeout values
When a negative timeout value is passed to epoll the 'slack' variable is
currently unitialized:
fs/eventpoll.c: In function ?\226?\128?\152ep_poll?\226?\128?\153:
fs/eventpoll.c:1119: warning: ?\226?\128?\152slack?\226?\128?\153 may be used uninitialized in this function
In this case a NULL pointer is passed to schedule_hrtimeout_range()
specifying an infinite timeout. The current implementation of
schedule_hrtimeout_range() does not use slack in this case, but we
should still initialize slack to 0 in case future implementations use it.
Modified Paths
Diff
Modified: trunk/fs/eventpoll.c (9735 => 9736)
--- trunk/fs/eventpoll.c 2011-03-18 08:26:57 UTC (rev 9735)
+++ trunk/fs/eventpoll.c 2011-03-18 08:36:02 UTC (rev 9736)
@@ -1140,7 +1140,7 @@
{
int res, eavail, timed_out = 0;
unsigned long flags;
- long slack;
+ long slack = 0;
wait_queue_t wait;
ktime_t expires, *to = NULL;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits