]> git.liburcu.org Git - urcu.git/commit
Fix: Use a filled signal mask to disable all signals
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 May 2013 11:30:18 +0000 (07:30 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 May 2013 11:37:41 +0000 (07:37 -0400)
commit264716f7f86a221722e50d793a37c1ebe01c6530
tree20a76a230fd5d16ab393f845661c33c579d9bb46
parent56e676d2f8caf811934a1490ee0aeaf545e9d768
Fix: Use a filled signal mask to disable all signals

Changelog from David Pelton's original patch:

While using lttng-ust with an application that was calling fork()
with pending signals, I found that all signals were getting unmasked
shortly before the underlying call to fork().  After some
investigation, I found that the rcu_bp_before_fork() function was
unmasking all signals.  Based on the comments for this function, it
should be masking all signals.  Inspection of the rest of the code
in urcu-bp.c revealed the same pattern in two other functions.

This patch changes the code to use a filled signal mask to disable
all signals.  The change to rcu_bp_before_fork() addressed the
problem I was seeing while using lttng-ust.  The changes to the
other two functions appear to fix other instances of the same
problem.

Updates by Mathieu Desnoyers:

- Use SIG_BLOCK instead of SIG_SETMASK when setting a filled mask. This
  has the same behavior in this case (since we're blocking all signals),
  but is semantically neater: if we ever some signals from that mask,
  we'd like to to a union with the signal mask already blocked by the
  application.
- Also fix incorrect signal masking in compat_arch_x86.c.

Reported-by: David Pelton <dpelton@ciena.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
compat_arch_x86.c
urcu-bp.c
This page took 0.029747 seconds and 4 git commands to generate.