Skip to content

slirp: Fix for requeuing crash, cleanups

Jan Kiszka qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 0 repliesNew
  2. v24 patches 4 repliesSuperseded
  3. v14 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Finally fixed Stefan's scenario by avoiding the recursion of if_start
- Fixed further corner cases in walking the packet queues

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5slirp: Keep next_m always validslirp/if.c+14 -80 replies
2/5slirp: Prevent recursion of if_startslirp/if.c slirp/slirp.h+11 -10 replies
3/5slirp: Fix queue walking in if_startslirp/if.c+39 -210 replies
4/5slirp: Remove unneeded if_queuedslirp/if.c slirp/slirp.c slirp/slirp.h+2 -170 replies
5/5slirp: Cleanup resources on instance removalslirp/ip_icmp.c slirp/ip_icmp.h slirp/ip_input.c +7 more+58 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchStefan Weil
1/5
2/5
3/5T-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/5] slirp: Fix for requeuing crash, cleanups

Well, this requeuing bug seems to have a long breath. Previous attempts to fix it (mine included) neglected the fact that we need to walk the queue of pending packets, not just restart from the beginning after a requeue. This version should get it Right(TM).

This also comes with a fix for resource cleanups on slirp shutdown. At least valgrind is happy now.

Changes in v3:
- Finally fixed Stefan's scenario by avoiding the recursion of if_start
- Fixed further corner cases in walking the packet queues

CC Fabien Chouteau <[email protected]>
CC Michael S. Tsirkin <[email protected]>
CC Stefan Weil <[email protected]>
CC Zhi Yong Wu <[email protected]>

Jan Kiszka (5):
slirp: Keep next_m always valid
slirp: Prevent recursion of if_start
slirp: Fix queue walking in if_start
slirp: Remove unneeded if_queued
slirp: Cleanup resources on instance removal

 slirp/if.c       |   86 ++++++++++++++++++++++++++++++++++-------------------
 slirp/ip_icmp.c  |    7 ++++
 slirp/ip_icmp.h  |    1 +
 slirp/ip_input.c |    7 ++++
 slirp/mbuf.c     |   21 +++++++++++++
 slirp/mbuf.h     |    1 +
 slirp/slirp.c    |   10 ++----
 slirp/slirp.h    |    4 ++-
 slirp/tcp_subr.c |    7 ++++
 slirp/udp.c      |    8 +++++
 slirp/udp.h      |    1 +
 11 files changed, 115 insertions(+), 38 deletions(-)
Signature · 1 line
1.7.3.4