uprobes: Fix the racy uprobe->flags manipulation
authorOleg Nesterov <oleg@redhat.com>
Sun, 30 Sep 2012 19:12:44 +0000 (21:12 +0200)
committerOleg Nesterov <oleg@redhat.com>
Sun, 7 Oct 2012 19:19:43 +0000 (21:19 +0200)
Multiple threads can manipulate uprobe->flags, this is obviously
unsafe. For example mmap can set UPROBE_COPY_INSN while register
tries to set UPROBE_RUN_HANDLER, the latter can also race with
can_skip_sstep() which clears UPROBE_SKIP_SSTEP.

Change this code to use bitops.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

No differences found