Commit: d565cc8dda58f86cbe266f6d1fb5803b8fac46db
Parent: ad3721178078f9469e54d90f689ab8268a5a5f41
Author: MichaƂ Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Committer: Brian Gix <brian.gix@intel.com>
Date: 2020-06-02 19:08:33
Tree: 8e56246b6ba7eaa802fcef7ef6d72603664ddd15

mesh: Fix FPE in overcommit logic. During overcommit, mesh_config_save is called in asynchronous mode to avoid blocking Send() calls. This means that update of cfg->write_time is scheduled via l_idle_oneshot, so if the next Send() gets scheduled first, the code may see elapsed time of zero. If this happens, then the overcommit logic was already executed and the overcommit is pending, so we can just return.

Diffstat

M mesh/mesh-config-json.c | 8 ++++++++

1 files changed, 8 insertions(+), 0 deletions(-)

View Full Diff | Patch