[ovs-dev] [PATCH] fatal-signal: Skip acquiring log fd lock.

Ben Pfaff blp at ovn.org
Mon Mar 23 21:34:21 UTC 2020

On Mon, Mar 23, 2020 at 02:22:17PM -0700, William Tu wrote:
> Due to not acquiring lock, clang reports:
>   lib/vlog.c:618:12: error: reading variable 'log_fd' requires holding mutex
>   'log_file_mutex' [-Werror,-Wthread-safety-analysis]
>   return log_fd;
> The patch fixes by skipping it using OVS_NO_THREAD_SAFETY_ANALYSIS.
> Tested-at: https://travis-ci.org/github/williamtu/ovs-travis/builds/666051210
> Fixex: ecd4a8fcdff2 ("fatal-signal: Log backtrace when no monitor daemon.")
> Signed-off-by: William Tu <u9012063 at gmail.com>

You can't just mark the existing send_backtrace_to_monitor()
OVS_NO_THREAD_SAFETY_ANALYSIS?  It seems like the easiest change.

Also, the OVS_REQUIRES should also go in vlog.h.



More information about the dev mailing list