qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 785243: Fix segmentation fault when qemu_sign


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 785243: Fix segmentation fault when qemu_signal_init fails
Date: Thu, 24 Jan 2019 07:04:20 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 78524330fdb28ebd9606970b10dc835ca308a03d
      
https://github.com/qemu/qemu/commit/78524330fdb28ebd9606970b10dc835ca308a03d
  Author: Fei Li <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M util/main-loop.c

  Log Message:
  -----------
  Fix segmentation fault when qemu_signal_init fails

When qemu_signal_init() fails in qemu_init_main_loop(), we return
without setting an error.  Its callers crash then when they try to
report the error with error_report_err().

To avoid such segmentation fault, add a new Error parameter to make
the call trace to propagate the err to the final caller.

Fixes: 2f78e491d7b46542158ce0b8132ee4e05bc0ade4
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Fei Li <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 49ed0d24a41acc8d03c65250c54276eb20076da7
      
https://github.com/qemu/qemu/commit/49ed0d24a41acc8d03c65250c54276eb20076da7
  Author: Fei Li <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M migration/channel.c
    M migration/migration.c
    M migration/migration.h
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  migration: fix the multifd code when receiving less channels

In our current code, when multifd is used during migration, if there
is an error before the destination receives all new channels, the
source keeps running, however the destination does not exit but keeps
waiting until the source is killed deliberately.

Fix this by dumping the specific error and let users decide whether
to quit from the destination side when failing to receive packet via
some channel. And update the comment for multifd_recv_new_channel().

Cc: Dr. David Alan Gilbert <address@hidden>
Cc: Peter Xu <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: Fei Li <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 1398b2e3fe2a1e4e85a3854885c949c7652d7b53
      
https://github.com/qemu/qemu/commit/1398b2e3fe2a1e4e85a3854885c949c7652d7b53
  Author: Fei Li <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M migration/migration.c
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  migration: multifd_save_cleanup() can't fail, simplify

multifd_save_cleanup() takes an Error ** argument and returns an
error code even though it can't actually fail.  Its callers
dutifully check for failure.  Remove the useless argument and return
value, and simplify the callers.

Cc: Dr. David Alan Gilbert <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: Fei Li <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 91b02dc7507f13d81b23ef2d68c1a0673fe32a66
      
https://github.com/qemu/qemu/commit/91b02dc7507f13d81b23ef2d68c1a0673fe32a66
  Author: Fei Li <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M migration/postcopy-ram.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: add more error handling for postcopy_ram_enable_notify

Call postcopy_ram_incoming_cleanup() to do the cleanup when
postcopy_ram_enable_notify fails. Besides, report the error
message when qemu_ram_foreach_migratable_block() fails.

Cc: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Fei Li <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 6d99c2d41c1bce9914cd9a5129327d9adb9db776
      
https://github.com/qemu/qemu/commit/6d99c2d41c1bce9914cd9a5129327d9adb9db776
  Author: Fei Li <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: unify error handling for process_incoming_migration_co

In the current code, if process_incoming_migration_co() fails we do
the same error handing: set the error state, close the source file,
do the cleanup for multifd, and then exit(EXIT_FAILURE). To make the
code clearer, add a "goto fail" to unify the error handling.

Cc: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Fei Li <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: fbbaacab2758cb3f32a07524710533b1d6422be4
      
https://github.com/qemu/qemu/commit/fbbaacab2758cb3f32a07524710533b1d6422be4
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M migration/rdma.c

  Log Message:
  -----------
  migration/rdma: unregister fd handler

Unregister the fd handler before we destroy the channel,
otherwise we've got a race where we might land in the
fd handler just as we're closing the device.

(The race is quite data dependent, you just have to have
the right set of devices for it to trigger).

Corresponds to RH bz: https://bugzilla.redhat.com/show_bug.cgi?id=1666601

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: b95d6588f2750a6b68ab02e232220bbc0d8dbcbe
      
https://github.com/qemu/qemu/commit/b95d6588f2750a6b68ab02e232220bbc0d8dbcbe
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M tests/test-vmstate.c

  Log Message:
  -----------
  tests: add /vmstate/simple/array

A very simple test to show VMSTATE_*_ARRAY usage and result. It could
be systematically extended to other primitives, but I leave that as an
exercise for others :).

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: de22ded044db6b78ef8c04b8045c63683751613f
      
https://github.com/qemu/qemu/commit/de22ded044db6b78ef8c04b8045c63683751613f
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M include/migration/register.h
    M migration/savevm.c

  Log Message:
  -----------
  vmstate: constify SaveVMHandlers

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: aecbfe9c64a6005f57b2132eb29db2ba7c0993fe
      
https://github.com/qemu/qemu/commit/aecbfe9c64a6005f57b2132eb29db2ba7c0993fe
  Author: Xiao Guangrong <address@hidden>
  Date:   2019-01-23 (Wed, 23 Jan 2019)

  Changed paths:
    M hmp.c
    M migration/migration.c
    M migration/migration.h
    M migration/ram.c
    M qapi/migration.json

  Log Message:
  -----------
  migration: introduce pages-per-second

It introduces a new statistic, pages-per-second, as bandwidth or mbps is
not enough to measure the performance of posting pages out as we have
compression, xbzrle, which can significantly reduce the amount of the
data size, instead, pages-per-second is the one we want

Signed-off-by: Xiao Guangrong <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
  With typo's Eric spotted fixed


  Commit: b6b2308113f8aad981f070968e0202f9ef2e6554
      
https://github.com/qemu/qemu/commit/b6b2308113f8aad981f070968e0202f9ef2e6554
  Author: Peter Maydell <address@hidden>
  Date:   2019-01-24 (Thu, 24 Jan 2019)

  Changed paths:
    M hmp.c
    M include/migration/register.h
    M migration/channel.c
    M migration/migration.c
    M migration/migration.h
    M migration/postcopy-ram.c
    M migration/ram.c
    M migration/ram.h
    M migration/rdma.c
    M migration/savevm.c
    M qapi/migration.json
    M tests/test-vmstate.c
    M util/main-loop.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20190123a' 
into staging

Migration pull 2019-01-23

New pages-per-second stat, a new test, and a bunch
of fixes and tidy ups.

# gpg: Signature made Wed 23 Jan 2019 15:54:48 GMT
# gpg:                using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20190123a:
  migration: introduce pages-per-second
  vmstate: constify SaveVMHandlers
  tests: add /vmstate/simple/array
  migration/rdma: unregister fd handler
  migration: unify error handling for process_incoming_migration_co
  migration: add more error handling for postcopy_ram_enable_notify
  migration: multifd_save_cleanup() can't fail, simplify
  migration: fix the multifd code when receiving less channels
  Fix segmentation fault when qemu_signal_init fails

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/3e821195b167...b6b2308113f8
      **NOTE:** GitHub Services has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      We will provide an alternative path for the email notifications by 
January 31st, 2019.

reply via email to

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