]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: prevent a possible race condition with lifetimes
authorNiels Dossche <dossche.niels@gmail.com>
Wed, 23 Feb 2022 13:19:56 +0000 (14:19 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 24 Feb 2022 17:10:23 +0000 (09:10 -0800)
commiteeabd3135db422699f745526fc1ad70d81709aac
tree2d598899295e7c4f956902539bcec566df92a121
parent6ad9d085a62ece7f224c52db644c958a5e58f177
ipv6: prevent a possible race condition with lifetimes

valid_lft, prefered_lft and tstamp are always accessed under the lock
"lock" in other places. Reading these without taking the lock may result
in inconsistencies regarding the calculation of the valid and preferred
variables since decisions are taken on these fields for those variables.

Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Niels Dossche <niels.dossche@ugent.be>
Link: https://lore.kernel.org/r/20220223131954.6570-1-niels.dossche@ugent.be
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/addrconf.c