Gao Feng
c48367427a
tcp: sysctl: Fix a race to avoid unexpected 0 window from space
...
Because sysctl_tcp_adv_win_scale could be changed any time, so there
is one race in tcp_win_from_space.
For example,
1.sysctl_tcp_adv_win_scale<=0 (sysctl_tcp_adv_win_scale is negative now)
2.space>>(-sysctl_tcp_adv_win_scale) (sysctl_tcp_adv_win_scale is postive now)
As a result, tcp_win_from_space returns 0. It is unexpected.
Certainly if the compiler put the sysctl_tcp_adv_win_scale into one
register firstly, then use the register directly, it would be ok.
But we could not depend on the compiler behavior.
Signed-off-by: Gao Feng <fgao@ikuai8.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-03-24 13:29:16 -07:00
..
2017-01-12 04:01:17 -05:00
2017-03-02 08:42:38 +01:00
2017-03-09 17:01:09 -08:00
2017-03-23 16:41:27 -07:00
2017-03-24 13:17:07 -07:00
2017-03-23 16:41:27 -07:00
2017-03-09 18:35:35 -08:00
2017-01-25 12:37:04 -05:00
2017-01-18 13:04:28 -05:00
2017-03-21 14:41:46 -07:00
2017-02-07 13:07:46 -05:00
2016-11-18 10:59:15 -05:00
2017-03-02 08:42:32 +01:00
2017-02-27 18:43:47 -08:00
2017-01-20 12:12:13 -05:00
2017-02-04 19:44:22 -05:00
2016-11-24 16:01:14 -05:00
2017-03-15 15:34:13 -07:00
2016-11-09 13:41:54 -05:00
2017-02-07 13:07:46 -05:00
2017-02-11 21:25:18 -05:00
2017-03-16 10:18:33 -07:00
2017-01-11 11:02:47 -05:00
2016-12-12 19:25:04 -08:00
2016-11-09 23:45:28 +01:00
2016-09-30 13:29:21 +02:00
2016-09-30 13:29:21 +02:00
2016-12-05 15:21:59 -05:00
2016-11-13 12:14:59 -05:00
2017-02-08 14:38:18 -05:00
2017-01-25 16:00:33 +01:00
2017-01-27 10:25:34 -05:00
2017-02-03 15:16:45 -05:00
2017-01-18 13:04:28 -05:00
2017-03-09 18:23:27 -08:00
2017-03-09 18:23:27 -08:00
2017-01-20 11:27:22 -05:00
2017-01-18 13:04:29 -05:00
2017-01-25 14:04:38 -05:00
2016-12-29 11:38:31 -05:00
2017-02-04 19:58:14 -05:00
2016-11-04 14:45:23 -04:00
2016-11-02 15:18:36 -04:00
2017-03-21 15:27:19 -07:00
2017-02-03 15:21:21 -05:00
2017-03-17 12:49:43 +01:00
2017-01-24 12:10:51 -05:00
2017-01-31 13:16:59 -05:00
2017-01-13 09:38:42 +01:00
2016-10-13 12:05:26 -04:00
2017-02-11 02:31:11 -05:00
2017-02-27 18:43:46 -08:00
2017-03-13 15:29:22 -07:00
2016-10-03 02:00:22 -04:00
2016-10-04 02:11:51 -04:00
2017-02-07 13:07:46 -05:00
2017-03-22 10:48:49 -07:00
2016-11-22 13:27:16 -05:00
2017-02-04 19:58:14 -05:00
2017-02-17 12:08:05 -05:00
2017-03-12 22:53:02 -07:00
2017-03-24 13:17:07 -07:00
2017-01-24 13:44:28 -05:00
2016-10-23 19:35:24 -04:00
2016-10-23 19:35:24 -04:00
2016-12-25 17:21:22 +01:00
2016-12-29 11:38:31 -05:00
2017-03-21 15:27:19 -07:00
2017-01-17 14:38:43 -05:00
2017-03-12 22:53:02 -07:00
2017-03-02 08:42:31 +01:00
2017-03-09 18:25:34 -08:00
2016-11-09 20:40:06 -05:00
2016-11-09 20:40:06 -05:00
2017-01-09 16:07:41 -05:00
2017-03-22 11:18:58 -07:00
2017-02-10 11:46:39 -05:00
2017-03-24 13:29:16 -07:00
2017-03-24 13:17:07 -07:00
2016-12-16 10:24:44 -08:00
2016-11-15 12:16:13 -05:00
2017-02-15 11:04:11 +01:00