Gao Feng
37633f021b
tcp: sysctl: Fix a race to avoid unexpected 0 window from space
...
[ Upstream commit c48367427a39ea0b85c7cf018fe4256627abfd9e ]
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 >
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-03-22 09:23:22 +01:00
..
2015-04-11 22:28:27 -04:00
2015-11-05 04:04:00 +01:00
2015-02-20 17:35:14 -05:00
2014-12-10 15:33:16 -05:00
2015-09-21 16:03:04 -07:00
2018-02-16 20:09:40 +01:00
2018-02-16 20:09:40 +01:00
2015-10-28 06:44:45 +01:00
2017-10-21 17:09:01 +02:00
2015-09-18 21:59:31 +02:00
2015-10-21 00:49:25 +02:00
2015-08-26 11:01:44 -07:00
2017-05-14 13:32:58 +02:00
2015-09-17 13:20:05 +02:00
2016-09-30 10:18:36 +02:00
2015-11-01 12:14:47 -05:00
2018-01-31 12:06:14 +01:00
2015-06-28 16:55:44 -07:00
2015-11-02 22:52:24 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2016-04-20 15:42:04 +09:00
2017-01-09 08:07:42 +01:00
2015-09-30 13:16:44 +02:00
2015-08-17 21:33:06 -07:00
2017-02-18 16:39:26 +01:00
2015-07-20 12:41:30 -07:00
2016-05-18 17:06:39 -07:00
2015-04-09 00:02:26 -04:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2015-11-01 15:56:11 -05:00
2018-02-25 11:03:34 +01:00
2016-03-03 15:07:04 -08:00
2015-10-08 04:27:02 -07:00
2017-06-07 12:05:59 +02:00
2015-09-23 15:33:15 -07:00
2015-09-09 14:19:50 -07:00
2015-09-01 16:46:08 -07:00
2015-10-07 04:27:42 -07:00
2014-11-12 15:01:35 -05:00
2014-09-30 01:02:26 -04:00
2017-12-05 11:22:49 +01:00
2015-08-27 15:42:48 -07:00
2015-08-10 14:03:54 -07:00
2015-08-31 15:17:17 -07:00
2014-11-05 16:30:03 -05:00
2015-09-30 13:16:44 +02:00
2015-03-23 22:12:09 -04:00
2015-10-03 04:32:42 -07:00
2015-03-18 22:00:35 -04:00
2015-11-02 22:46:09 -05:00
2016-03-03 15:07:07 -08:00
2016-01-31 11:29:01 -08:00
2017-09-27 11:00:11 +02:00
2015-10-23 05:42:21 -07:00
2017-11-18 11:11:07 +01:00
2015-10-20 06:08:27 -07:00
2015-12-16 00:14:12 -05:00
2017-09-27 11:00:10 +02:00
2017-07-21 07:44:55 +02:00
2018-02-25 11:03:34 +01:00
2017-06-07 12:05:59 +02:00
2018-02-28 10:17:21 +01:00
2016-05-11 11:21:09 +02:00
2018-01-02 20:33:24 +01:00
2018-01-31 12:06:12 +01:00
2014-11-24 04:28:49 -05:00
2017-08-11 09:08:56 -07:00
2016-01-04 22:58:30 -05:00
2014-10-14 02:18:27 +02:00
2014-12-10 15:21:24 -05:00
2015-05-11 10:50:17 -04:00
2014-12-10 15:21:24 -05:00
2015-10-08 04:27:03 -07:00
2017-05-20 14:27:03 +02:00
2015-10-21 00:49:24 +02:00
2015-10-23 06:26:42 -07:00
2014-11-05 23:52:33 -08:00
2015-12-01 15:07:59 -05:00
2015-08-10 13:46:21 -07:00
2018-01-31 12:06:14 +01:00
2018-02-25 11:03:51 +01:00
2015-09-30 13:16:44 +02:00
2015-03-02 13:06:31 -05:00
2014-10-06 18:02:32 -04:00
2015-08-27 14:18:48 -07:00
2018-02-25 11:03:40 +01:00
2014-12-17 11:49:55 +01:00
2015-10-16 00:52:19 -07:00
2016-01-04 22:58:30 -05:00
2015-10-21 19:15:20 -07:00
2017-08-30 10:19:21 +02:00
2016-03-03 15:07:05 -08:00
2014-10-15 07:48:18 +02:00
2016-11-15 07:46:36 +01:00
2016-06-24 10:18:16 -07:00
2015-03-12 22:58:12 -04:00
2018-03-22 09:23:22 +01:00
2015-07-09 15:12:20 -07:00
2015-10-26 22:24:22 -07:00
2015-08-29 13:07:54 -07:00
2015-03-02 13:06:31 -05:00
2018-03-11 16:19:46 +01:00
2015-12-05 18:15:29 -05:00
2017-07-05 14:37:21 +02:00