[ovs-git] [openvswitch/ovs] e9d680: vlog: Fix a deadlock bug.

GitHub noreply at github.com
Thu Nov 19 21:18:20 UTC 2015

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: e9d6808ca6bfeb6b8d1ca30113c186098e4d2d56
  Author: Andy Zhou <azhou at von.org>
  Date:   2015-11-19 (Thu, 19 Nov 2015)

  Changed paths:
    M lib/vlog.c

  Log Message:
  vlog: Fix a deadlock bug.

Calling VLOG_FATAL() while holding the 'log_file_mutex" may lead to
deadlock since VLOG_FATAL() implementation tries to acquire the
same lock. Fix this by building the error message first, then
call VLOG_FATAL() after the 'log_file_mutex' has been released.

This bug is not likely show up in practice since chown() usually
won't fail. It is still better to have a correct implementation.

Reported-by: Daniele Di Proietto <ddiproietto at vmware.com>
Signed-off-by: Andy Zhou <azhou at ovn.org>
Acked-by: Daniele Di Proietto <ddiproietto at vmware.com>

More information about the git mailing list