Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7aa8e63f authored by Jiri Bohac's avatar Jiri Bohac Committed by David S. Miller
Browse files

ipv6: properly prevent temp_prefered_lft sysctl race



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: default avatarJiri Bohac <jbohac@suse.cz>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Fixes: 76506a98 ("IPv6: fix DESYNC_FACTOR")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8be0328e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment