From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bdl-0000lW-Be for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:36:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5bdd-00088N-Qs for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:36:12 -0500 Received: from david.siemens.de ([192.35.17.14]:34967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bdd-000887-I2 for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:36:05 -0500 From: Jan Kiszka Date: Thu, 8 Mar 2012 12:35:40 +0100 Message-Id: Subject: [Qemu-devel] [PATCH v3 0/5] slirp: Fix for requeuing crash, cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Zhi Yong Wu , Fabien Chouteau , "Michael S. Tsirkin" 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 CC: Michael S. Tsirkin CC: Stefan Weil CC: Zhi Yong Wu 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(-) -- 1.7.3.4