[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 68e5ec: tap: avoid deadlocking rx
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 68e5ec: tap: avoid deadlocking rx |
Date: |
Wed, 12 Mar 2014 10:00:04 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 68e5ec64009812dbaa03ed9cfded9344986f5304
https://github.com/qemu/qemu/commit/68e5ec64009812dbaa03ed9cfded9344986f5304
Author: Stefan Hajnoczi <address@hidden>
Date: 2014-03-12 (Wed, 12 Mar 2014)
Changed paths:
M net/tap.c
Log Message:
-----------
tap: avoid deadlocking rx
The net subsystem has a control flow mechanism so peer NetClientStates
can tell each other to stop sending packets. This is used to stop
monitoring the tap file descriptor for incoming packets if the guest rx
ring has no spare buffers.
There is a corner case when tap_can_send() is true at the beginning of
an event loop iteration but becomes false before the tap_send() fd
handler is invoked.
tap_send() will read the packet from the tap file descriptor and attempt
to send it. The net queue will hold on to the packet and return 0,
indicating that further I/O is not possible. tap then stops monitoring
the file descriptor for reads.
This is unlike the normal case where tap_can_send() is the same before
and during the event loop iteration. The event loop would simply not
monitor the file descriptor if tap_can_send() returns true. Upon next
iteration it would check tap_can_send() again and begin monitoring if we
can send.
The deadlock happens because tap_send() explicitly disabled read_poll.
This is done with the expectation that the peer will call
qemu_net_queue_flush(). But hw/net/virtio-net.c does not monitor
vm_running transitions and issue the flush. Hence we're left with a
broken tap device.
Cc: address@hidden
Reported-by: Neil Skrypuch <address@hidden>
Tested-by: Neil Skrypuch <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: 84f3fe1b077a06ca50f85fa3ff696a8fe094623b
https://github.com/qemu/qemu/commit/84f3fe1b077a06ca50f85fa3ff696a8fe094623b
Author: Peter Maydell <address@hidden>
Date: 2014-03-12 (Wed, 12 Mar 2014)
Changed paths:
M trace/control-internal.h
Log Message:
-----------
trace: Fix build warnings for Win32 build
The Win32 build warns about trace/control-internal.h:
warning: 'trace_event_count' declared inline after being called
Fix this by simply reordering trace_event_id() and
trace_event_count().
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Commit: a822837d123183293f1cfc3167cc4e5255765915
https://github.com/qemu/qemu/commit/a822837d123183293f1cfc3167cc4e5255765915
Author: Peter Maydell <address@hidden>
Date: 2014-03-12 (Wed, 12 Mar 2014)
Changed paths:
M trace/control-internal.h
Log Message:
-----------
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request'
into staging
Tracing pull request
# gpg: Signature made Wed 12 Mar 2014 13:20:10 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg: aka "Stefan Hajnoczi <address@hidden>"
# 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: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/tracing-pull-request:
trace: Fix build warnings for Win32 build
Signed-off-by: Peter Maydell <address@hidden>
Commit: 2f23e9ae2cc37788ae1211803a7f8545ae14df91
https://github.com/qemu/qemu/commit/2f23e9ae2cc37788ae1211803a7f8545ae14df91
Author: Peter Maydell <address@hidden>
Date: 2014-03-12 (Wed, 12 Mar 2014)
Changed paths:
M net/tap.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into
staging
Net patches
# gpg: Signature made Wed 12 Mar 2014 13:48:20 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg: aka "Stefan Hajnoczi <address@hidden>"
# 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: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/net-pull-request:
tap: avoid deadlocking rx
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/01ac27ce7f14...2f23e9ae2cc3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 68e5ec: tap: avoid deadlocking rx,
GitHub <=