summary refs log tree commit diff stats
path: root/hw/intc
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-12-06 18:07:09 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2016-12-06 20:21:46 +0000
commita9353fe897ca2687e5b3385ed39e3db3927a90e0 (patch)
treecdcbdc899172840177ee1330e69d5a101c07eb6d /hw/intc
parentd750c3a966d6409356739e97fa4d4a6446754e1e (diff)
downloadfocaccia-qemu-a9353fe897ca2687e5b3385ed39e3db3927a90e0.tar.gz
focaccia-qemu-a9353fe897ca2687e5b3385ed39e3db3927a90e0.zip
exec.c: Fix breakpoint invalidation race
A bug (1647683) was reported showing a crash when removing
breakpoints.  The reproducer was bisected to 3359baad when tb_flush
was finally made thread safe.  While in MTTCG the locking in
breakpoint_invalidate would have prevented any problems, but
currently tb_lock() is a NOP for system emulation.

The race is between a tb_flush from the gdbstub and the
tb_invalidate_phys_addr() in breakpoint_invalidate().

Ideally we'd have actual locking here; for the moment the
simple fix is to do a full tb_flush() for a bp invalidate,
since that is thread-safe even if no lock is taken.

Reported-by: Julian Brown <julian@codesourcery.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1481047629-7763-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/intc')
0 files changed, 0 insertions, 0 deletions