1. 22 8月, 2016 1 次提交
    • M
      slirp: fix segv when init failed · 67f3280c
      Marc-André Lureau 提交于
      Since commit f6c2e66a, slirp uses an exit notifier to call
      slirp_smb_cleanup. However, if init() failed, the notifier isn't added,
      and removing it will fail:
      
      ==18447== Invalid write of size 8
      ==18447==    at 0x7EF2B5: notifier_remove (notify.c:32)
      ==18447==    by 0x48E80C: qemu_remove_exit_notifier (vl.c:2661)
      ==18447==    by 0x6A2187: net_slirp_cleanup (slirp.c:134)
      ==18447==    by 0x69419D: qemu_cleanup_net_client (net.c:338)
      ==18447==    by 0x69445B: qemu_del_net_client (net.c:401)
      ==18447==    by 0x6A2B81: net_slirp_init (slirp.c:366)
      ==18447==    by 0x6A4241: net_init_slirp (slirp.c:865)
      ==18447==    by 0x695C6D: net_client_init1 (net.c:1051)
      ==18447==    by 0x695F6E: net_client_init (net.c:1108)
      ==18447==    by 0x696DBA: net_init_netdev (net.c:1498)
      ==18447==    by 0x7F1F99: qemu_opts_foreach (qemu-option.c:1116)
      ==18447==    by 0x696E60: net_init_clients (net.c:1516)
      ==18447==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      67f3280c
  2. 19 8月, 2016 4 次提交
  3. 18 8月, 2016 7 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 02b1ad88
      Peter Maydell 提交于
      # gpg: Signature made Thu 18 Aug 2016 14:39:31 BST
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        block: fix possible reorder of flush operations
        block: fix deadlock in bdrv_co_flush
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      02b1ad88
    • D
      block: fix possible reorder of flush operations · 156af3ac
      Denis V. Lunev 提交于
      This patch reduce CPU usage of flush operations a bit. When we have one
      flush completed we should kick only next operation. We should not start
      all pending operations in the hope that they will go back to wait on
      wait_queue.
      
      Also there is a technical possibility that requests will get reordered
      with the previous approach. After wakeup all requests are removed from
      the wait queue. They become active and they are processed one-by-one
      adding to the wait queue in the same order. Though new flush can arrive
      while all requests are not put into the queue.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Tested-by: NEvgeny Yakovlev <eyakovlev@virtuozzo.com>
      Signed-off-by: NEvgeny Yakovlev <eyakovlev@virtuozzo.com>
      Message-id: 1471457214-3994-3-git-send-email-den@openvz.org
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Fam Zheng <famz@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      156af3ac
    • E
      block: fix deadlock in bdrv_co_flush · ce83ee57
      Evgeny Yakovlev 提交于
      The following commit
          commit 3ff2f67a
          Author: Evgeny Yakovlev <eyakovlev@virtuozzo.com>
          Date:   Mon Jul 18 22:39:52 2016 +0300
          block: ignore flush requests when storage is clean
      has introduced a regression.
      
      There is a problem that it is still possible for 2 requests to execute
      in non sequential fashion and sometimes this results in a deadlock
      when bdrv_drain_one/all are called for BDS with such stalled requests.
      
      1. Current flushed_gen and flush_started_gen is 1.
      2. Request 1 enters bdrv_co_flush to with write_gen 1 (i.e. the same
         as flushed_gen). It gets past flushed_gen != flush_started_gen and
         sets flush_started_gen to 1 (again, the same it was before).
      3. Request 1 yields somewhere before exiting bdrv_co_flush
      4. Request 2 enters bdrv_co_flush with write_gen 2. It gets past
         flushed_gen != flush_started_gen and sets flush_started_gen to 2.
      5. Request 2 runs to completion and sets flushed_gen to 2
      6. Request 1 is resumed, runs to completion and sets flushed_gen to 1.
         However flush_started_gen is now 2.
      
      From here on out flushed_gen is always != to flush_started_gen and all
      further requests will wait on flush_queue. This change replaces
      flush_started_gen with an explicitly tracked active flush request.
      Signed-off-by: NEvgeny Yakovlev <eyakovlev@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Message-id: 1471457214-3994-2-git-send-email-den@openvz.org
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Fam Zheng <famz@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ce83ee57
    • P
      Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging · 5844365f
      Peter Maydell 提交于
      # gpg: Signature made Thu 18 Aug 2016 06:36:16 BST
      # gpg:                using RSA key 0xEF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * remotes/jasowang/tags/net-pull-request:
        net/net: properly handle multiple packets in net_fill_rstate()
        net: vmxnet: use g_new for pkt initialisation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5844365f
    • P
      Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging · 4b887ae6
      Peter Maydell 提交于
      Fix 'make docker-test-mingw@fedora'
      
      Peter,
      
      This is the single patch that stalls patchew's mingw testing. Since it
      is small and trivial, let's have it in 2.7.
      
      Fam
      
      # gpg: Signature made Wed 17 Aug 2016 13:13:53 BST
      # gpg:                using RSA key 0xCA35624C6A9171C6
      # gpg: Good signature from "Fam Zheng <famz@redhat.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6
      
      * remotes/famz/tags/docker-pull-request:
        curl: Cast fd to int for DPRINTF
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4b887ae6
    • Z
      net/net: properly handle multiple packets in net_fill_rstate() · e9e0a585
      Zhang Chen 提交于
      When network is busy, we will receive multiple packets at one time. In
      that situation, we should keep trying to do the receiving instead of
      finalizing only the first packet.
      Signed-off-by: NZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: NLi Zhijian <lizhijian@cn.fujitsu.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      e9e0a585
    • L
      net: vmxnet: use g_new for pkt initialisation · 47882fa4
      Li Qiang 提交于
      When network transport abstraction layer initialises pkt, the maximum
      fragmentation count is not checked. This could lead to an integer
      overflow causing a NULL pointer dereference. Replace g_malloc() with
      g_new() to catch the multiplication overflow.
      Reported-by: NLi Qiang <liqiang6-s@360.cn>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Acked-by: NDmitry Fleytman <dmitry@daynix.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      47882fa4
  4. 17 8月, 2016 2 次提交
  5. 16 8月, 2016 15 次提交
  6. 15 8月, 2016 7 次提交
  7. 13 8月, 2016 3 次提交
  8. 12 8月, 2016 1 次提交
    • P
      target-arm: Fix warn about implicit conversion · 6bbbb0ac
      Pranith Kumar 提交于
      Clang warns about an implicit conversion as follows:
      
      /mnt/devops/code/qemu/target-arm/neon_helper.c:1075:1: warning: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Wconstant-conversion]
      NEON_VOP_ENV(qrshl_s8, neon_s8, 4)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /mnt/devops/code/qemu/target-arm/neon_helper.c:116:83: note: expanded from macro 'NEON_VOP_ENV'
      uint32_t HELPER(glue(neon_,name))(CPUARMState *env, uint32_t arg1, uint32_t arg2) \
                                                                                        ^
      /mnt/devops/code/qemu/target-arm/neon_helper.c:106:5: note: expanded from macro '\
      NEON_VOP_BODY'
          NEON_DO##n; \
          ^~~~~~~~~~
      <scratch space>:21:1: note: expanded from here
      NEON_DO4
      ^~~~~~~~
      /mnt/devops/code/qemu/target-arm/neon_helper.c:93:5: note: expanded from macro 'NEON_DO4'
          NEON_FN(vdest.v1, vsrc1.v1, vsrc2.v1); \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /mnt/devops/code/qemu/target-arm/neon_helper.c:1054:23: note: expanded from macro 'NEON_FN'
                  dest = (1 << (sizeof(src1) * 8 - 1)); \
                       ~  ~~^~~~~~~~~~~~~~~~~~~~~~~~~
      
      Fix it by casting to appropriate type.
      Signed-off-by: NPranith Kumar <bobby.prani@gmail.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6bbbb0ac