From: Jiri Bohac <jbo...@suse.cz> Date: Wed, 19 Oct 2016 15:16:36 +0200
> The purpose was to guard against the user updating the > temp_prefered_lft sysctl after this: > > max_desync_factor = min_t(__u32, > idev->cnf.max_desync_factor, > idev->cnf.temp_prefered_lft - > regen_advance); > > but before this: > > tmp_prefered_lft = idev->cnf.temp_prefered_lft + age - > idev->desync_factor; That's a different problem. Read the sysctl values of interest into local variables using READ_ONCE() before the calculations, that way the situation your describe is impossible.