From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 05:45:02 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 0C7F5106566C for ; Mon, 26 Sep 2011 05:45:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id B836D8FC0A for ; Mon, 26 Sep 2011 05:45:01 +0000 (UTC) Received: by yxk36 with SMTP id 36so5124585yxk.13 for ; Sun, 25 Sep 2011 22:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=NQvWKnnqj3ln2FdWed4he7uV9WeUz2XN3MyoOiVSkV0=; b=jZuS7fHM1T1YdRhaUdpJFt7bNW3moBCOvIAKKL28vAc7ze3RcMl0AmZRTGvkDp2e9i LqCKkSXl6VF+zDbzIHJlua2MMH/s2JfsoLdA5VNxDD8YznnhsUAwDX9scvYpC765oeCs djUvSZbPE0w9QXe8pdfXY1O2eqWNm//ut2JMQ= MIME-Version: 1.0 Received: by 10.236.129.165 with SMTP id h25mr36578848yhi.38.1317015901085; Sun, 25 Sep 2011 22:45:01 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.111.42 with HTTP; Sun, 25 Sep 2011 22:45:01 -0700 (PDT) In-Reply-To: References: Date: Mon, 26 Sep 2011 13:45:01 +0800 X-Google-Sender-Auth: T_BAG6xB4Uwfw2ZQm1RjyXpPVug Message-ID: From: Adrian Chadd To: Arnaud Lacombe Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org, 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 05:45:02 -0000 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? Adrian