qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 817ef0: Make qemu_shutdown_requested signal-s


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 817ef0: Make qemu_shutdown_requested signal-safe
Date: Mon, 27 Oct 2014 10:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 817ef04db2cfa2df04daffd6917f4ea7605f6403
      
https://github.com/qemu/qemu/commit/817ef04db2cfa2df04daffd6917f4ea7605f6403
  Author: Jan Kiszka <address@hidden>
  Date:   2014-10-27 (Mon, 27 Oct 2014)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  Make qemu_shutdown_requested signal-safe

qemu_shutdown_requested may be interrupted by qemu_system_killed. If the
latter sets shutdown_requested after qemu_shutdown_requested has read it
but before it was cleared, the shutdown event is lost. Fix this by using
atomic_xchg.

This provides a different fix for the problem which commit 15124e142
attempts to deal with. That commit breaks use of ^C to drop into gdb,
and so this approach is better (and 15124e142 can be reverted).

Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Gonglei <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
[PMM: commit message tweak]
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 3e9418e160cd8901c83a3c88967158084f5b5c03
      
https://github.com/qemu/qemu/commit/3e9418e160cd8901c83a3c88967158084f5b5c03
  Author: Jan Kiszka <address@hidden>
  Date:   2014-10-27 (Mon, 27 Oct 2014)

  Changed paths:
    M main-loop.c

  Log Message:
  -----------
  Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously"

This reverts commit 15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks
debuggability of qemu and is no longer needed as the problem has
now been addressed in a different way.

Instead we provide a comment about why these signals must be
handled asynchronously.

Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Gonglei <address@hidden>
[PMM: added comment]
Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/ff0d48768bd5...3e9418e160cd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]