diff options
-rw-r--r-- | fs/select.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/select.c b/fs/select.c index b7b10aa30861..e56560d2b08a 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -306,6 +306,8 @@ static int poll_select_copy_remaining(struct timespec *end_time, void __user *p, | |||
306 | rts.tv_sec = rts.tv_nsec = 0; | 306 | rts.tv_sec = rts.tv_nsec = 0; |
307 | 307 | ||
308 | if (timeval) { | 308 | if (timeval) { |
309 | if (sizeof(rtv) > sizeof(rtv.tv_sec) + sizeof(rtv.tv_usec)) | ||
310 | memset(&rtv, 0, sizeof(rtv)); | ||
309 | rtv.tv_sec = rts.tv_sec; | 311 | rtv.tv_sec = rts.tv_sec; |
310 | rtv.tv_usec = rts.tv_nsec / NSEC_PER_USEC; | 312 | rtv.tv_usec = rts.tv_nsec / NSEC_PER_USEC; |
311 | 313 | ||