mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
make sys_poll() wait at least timeout ms
schedule_timeout(jiffies) waits for at least jiffies - 1. Add 1 jiffie to the timeout_jiffies calculated in sys_poll() to wait at least timeout_msecs, like poll() manpage says. Signed-off-by: Karsten Wiese <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
54d2a37eda
commit
844fcc5396
1 changed files with 1 additions and 1 deletions
|
|
@ -739,7 +739,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
|
|||
timeout_jiffies = -1;
|
||||
else
|
||||
#endif
|
||||
timeout_jiffies = msecs_to_jiffies(timeout_msecs);
|
||||
timeout_jiffies = msecs_to_jiffies(timeout_msecs) + 1;
|
||||
} else {
|
||||
/* Infinite (< 0) or no (0) timeout */
|
||||
timeout_jiffies = timeout_msecs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue