diff options
author | Doron Roberts-Kedes <doronrk@fb.com> | 2018-04-20 22:11:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-23 04:09:16 +0300 |
commit | 7c5aba211dd61f41d737a2c51729eb9fdcd3edf4 (patch) | |
tree | 2436a7533654ee8713277f3a736bc6c877333268 /mm | |
parent | a957fa190aa9d9168b33d460a5241a6d088c6265 (diff) | |
download | linux-7c5aba211dd61f41d737a2c51729eb9fdcd3edf4.tar.xz |
strparser: Do not call mod_delayed_work with a timeout of LONG_MAX
struct sock's sk_rcvtimeo is initialized to
LONG_MAX/MAX_SCHEDULE_TIMEOUT in sock_init_data. Calling
mod_delayed_work with a timeout of LONG_MAX causes spurious execution of
the work function. timer->expires is set equal to jiffies + LONG_MAX.
When timer_base->clk falls behind the current value of jiffies,
the delta between timer_base->clk and jiffies + LONG_MAX causes the
expiration to be in the past. Returning early from strp_start_timer if
timeo == LONG_MAX solves this problem.
Found while testing net/tls_sw recv path.
Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages")
Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions