[ovs-dev] [PATCHv2] fatal-signal: Fix clang error due to lock.
u9012063 at gmail.com
Tue Mar 24 14:48:32 UTC 2020
On Tue, Mar 24, 2020 at 03:38:31PM +0100, Ilya Maximets wrote:
> On 3/24/20 3:27 PM, Ilya Maximets wrote:
> > On 3/24/20 3:17 PM, 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 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>
> >> Signed-off-by: William Tu <u9012063 at gmail.com>
> >> ---
> I didn't test, but the code looks good to me.
> Acked-by: Ilya Maximets <i.maximets at ovn.org>
Thanks, applied to master.
More information about the dev