Thread (4 messages) flat view 4 messages, 3 authors, 2017-03-25

Re: [PATCH net-next 1/1] tcp: sysctl: Fix a race to avoid unexpected 0 window from space

From: David Miller <davem@davemloft.net>
Date: 2017-03-24 20:29:33

From: gfree.wind@foxmail.com
Date: Fri, 24 Mar 2017 07:05:12 +0800
From: Gao Feng <redacted>

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 <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help