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

William Tu u9012063 at gmail.com
Mon Mar 23 21:58:07 UTC 2020


On Mon, Mar 23, 2020 at 2:34 PM Ben Pfaff <blp at ovn.org> wrote:
>
> 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.
OK
that will also work.
>
> Also, the OVS_REQUIRES should also go in vlog.h.
OK
Thanks,
William


More information about the dev mailing list