[ovs-git] [openvswitch/ovs] ecbc7f: fatal-signal: Fix clang error due to lock.

William Tu noreply at github.com
Tue Mar 24 14:48:13 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: ecbc7f0aa2e112afc5ce63cf8a20ebd41e20b73b
      https://github.com/openvswitch/ovs/commit/ecbc7f0aa2e112afc5ce63cf8a20ebd41e20b73b
  Author: William Tu <u9012063 at gmail.com>
  Date:   2020-03-24 (Tue, 24 Mar 2020)

  Changed paths:
    M include/openvswitch/vlog.h
    M lib/fatal-signal.c
    M lib/vlog.c

  Log Message:
  -----------
  fatal-signal: Fix clang error due to lock.

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 it by creating a function in vlog.c to write
directly to log file unsafely.

Tested-at: https://travis-ci.org/github/williamtu/ovs-travis/builds/666165883
Fixes: ecd4a8fcdff2 ("fatal-signal: Log backtrace when no monitor daemon.")
Suggested-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: William Tu <u9012063 at gmail.com>




More information about the git mailing list