From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 14:02:42 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A73106566B; Mon, 26 Sep 2011 14:02:42 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7368FC26; Mon, 26 Sep 2011 14:02:41 +0000 (UTC) Received: by wwe3 with SMTP id 3so6227636wwe.31 for ; Mon, 26 Sep 2011 07:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=uafIC7gOQIvS1KfLe0jx6gTdpfmSGpRK0VM8P39Ad2k=; b=YDE0jxW3W+wZWkPuPQJg1azvrn0M/+GM9ltF3fsXC8puH32ApYeFyZP6YCEV3ImX57 1niu6/Wxt5syLicvcpAC/ufQqMe7kUwnvTfAb5FQSUbbq8y5gZq+QWWzq9ZI9ynsv1yT W/9sbCYh7eV7VCM9o58a+AlrCYcWVmelwbWPI= MIME-Version: 1.0 Received: by 10.227.175.77 with SMTP id w13mr5714316wbz.36.1317045760998; Mon, 26 Sep 2011 07:02:40 -0700 (PDT) Received: by 10.180.103.33 with HTTP; Mon, 26 Sep 2011 07:02:40 -0700 (PDT) In-Reply-To: References: Date: Mon, 26 Sep 2011 10:02:40 -0400 Message-ID: From: Arnaud Lacombe To: "K. Macy" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-net@freebsd.org" , Adrian Chadd , dave jones Subject: Re: Kernel panic on FreeBSD 9.0-beta2 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 14:02:42 -0000 Hi, On Mon, Sep 26, 2011 at 5:12 AM, K. Macy wrote: > > > On Monday, September 26, 2011, Adrian Chadd wrote: >> On 26 September 2011 13:41, Arnaud Lacombe wrote: >>> =A0/* >>> =A0 * XXX >>> =A0 * This entire block sorely needs a rewrite. >>> =A0 */ >>> =A0 =A0 =A0 =A0if (t && >>> =A0 =A0 =A0 =A0 =A0 =A0((t->inp_flags & INP_TIMEWAIT) =3D=3D 0) && >>> =A0 =A0 =A0 =A0 =A0 =A0(so->so_type !=3D SOCK_STREAM || >>> =A0 =A0 =A0 =A0 =A0 =A0 ntohl(t->inp_faddr.s_addr) =3D=3D INADDR_ANY) &= & >>> =A0 =A0 =A0 =A0 =A0 =A0(ntohl(sin->sin_addr.s_addr) !=3D INADDR_ANY || >>> =A0 =A0 =A0 =A0 =A0 =A0 ntohl(t->inp_laddr.s_addr) !=3D INADDR_ANY || >>> =A0 =A0 =A0 =A0 =A0 =A0 (t->inp_socket->so_options & >>> =A0 =A0 =A0 =A0 =A0 SO_REUSEPORT) =3D=3D 0) && >>> =A0 =A0 =A0 =A0 =A0 =A0(inp->inp_cred->cr_uid !=3D >>> =A0 =A0 =A0 =A0 =A0 =A0 t->inp_cred->cr_uid)) >>> =A0 =A0 =A0 =A0 =A0return (EADDRINUSE); >>> =A0 =A0 =A0} >>> >>> more specifically, `t->inp_socket' is NULL. The top comment may not be >>> relevant, as it's been here for the past 8 years. >> >> Why would t->inp_socket be NULL at this point? > > TIME_WAIT ... > on UDP socket ? - Arnaud