config: use a mutex to protect access to the inner map