Date: Fri, 27 Jul 2007 15:28:45 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: current@FreeBSD.org Cc: kris@FreeBSD.org, csjp@FreeBSD.org Subject: Re: Removing NET_NEEDS_GIANT: first patch Message-ID: <20070727152647.T46637@fledge.watson.org> In-Reply-To: <20070725110221.C83919@fledge.watson.org> References: <20070725110221.C83919@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Jul 2007, Robert Watson wrote: > Things this patch doesn't do: > > - Address the WITNESS lock order warnings generated when credential rules > are > used with ipfw/pf. These are believed to be annoying but non-harmful, as > deadlocks are no longer reported. This view may be revised if evidence to > the contrary is presented. Kris managed to find a report that one of the post-6.0 hangs involved DIVERT sockets, and sure enough, there is a call to ip_output() without an inpcb pointer, which could cause problems. The attached patch may fix this and another recursion-ish issue involving directly invoking ip_input() rather than indirectly via the netisr. If users of IPDIVERT could give this patch a try and make sure breaks, it could be this resolves the reported issues. Regardless of whether it fixes things, it should probably be committed anyway. Robert N M Watson Computer Laboratory University of Cambridge Index: ip_divert.c =================================================================== RCS file: /data/fbsd-cvs/ncvs/src/sys/netinet/ip_divert.c,v retrieving revision 1.128 diff -u -r1.128 ip_divert.c --- ip_divert.c 11 May 2007 10:20:50 -0000 1.128 +++ ip_divert.c 27 Jul 2007 14:25:09 -0000 @@ -61,6 +61,7 @@ #include <vm/uma.h> #include <net/if.h> +#include <net/netisr.h> #include <net/route.h> #include <netinet/in.h> @@ -378,7 +379,7 @@ ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0) | IP_ALLOWBROADCAST | IP_RAWOUTPUT, - inp->inp_moptions, NULL); + inp->inp_moptions, inp); } INP_UNLOCK(inp); INP_INFO_WUNLOCK(&divcbinfo); @@ -407,7 +408,7 @@ SOCK_UNLOCK(so); #endif /* Send packet to input processing */ - ip_input(m); + netisr_queue(NETISR_IP, m); } return error;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070727152647.T46637>