Thread (8 messages) flat view 8 messages, 3 authors, 2016-10-20

Re: [PATCH] ipv6: properly prevent temp_prefered_lft sysctl race

From: David Miller <davem@davemloft.net>
Date: 2016-10-20 18:29:36

From: Jiri Bohac <redacted>
Date: Thu, 20 Oct 2016 12:29:26 +0200
The check for an underflow of tmp_prefered_lft is always false
because tmp_prefered_lft is unsigned. The intention of the check
was to guard against racing with an update of the
temp_prefered_lft sysctl, potentially resulting in an underflow.

As suggested by David Miller, the best way to prevent the race is
by reading the sysctl variable using READ_ONCE.

Signed-off-by: Jiri Bohac <redacted>
Reported-by: Julia Lawall <redacted>
Fixes: 76506a986dc3 ("IPv6: fix DESYNC_FACTOR")
Applied, thanks Jiri.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help