From owner-svn-src-head@FreeBSD.ORG Wed Apr 18 02:22:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BE40106566B for ; Wed, 18 Apr 2012 02:22:57 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5228FC15 for ; Wed, 18 Apr 2012 02:22:57 +0000 (UTC) Received: by dadz14 with SMTP id z14so30158528dad.17 for ; Tue, 17 Apr 2012 19:22:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=QzlKT1v87OHZQu3jTK63EUSMVlOR4ov8PEhEA6PJ3YQ=; b=DzbkgnVWKXa2Nllv/8KBdqSNQcAJgGysHhFbAcN1FDkzmrebyB4zFifUDm8cxQA2m3 4X0TwGUMNKtSuUv7mjqylMrZm1QsdmTDZVh86MNMN3F6lQd8aQXrshO/Hh6FD+OqHpGG 98LMFaIQUMzsONbr+/Nqj05+QtuwU0ubsDrSSyi3BHJLkOoHqn4QyMNK5iHS6KjHApdM ZrIbuSjKjUt7IQ/aPhMqVPrvaH4lk56FDD8ziXAVuGTRqW+dToJ4pLG3QIhnT4eUj3nk WK05/8pMc3fM4RjUMr2FTrSXhXZxi3QDay6Lvr3f74meVzYueW67Iwh/VqBCd67jUymv zEGA== MIME-Version: 1.0 Received: by 10.68.219.72 with SMTP id pm8mr2146391pbc.116.1334715776927; Tue, 17 Apr 2012 19:22:56 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.239.164 with HTTP; Tue, 17 Apr 2012 19:22:56 -0700 (PDT) In-Reply-To: <20120418021614.GA37269@server.vk2pj.dyndns.org> References: <201204180139.q3I1dEPZ008424@svn.freebsd.org> <20120418021614.GA37269@server.vk2pj.dyndns.org> Date: Wed, 18 Apr 2012 14:22:56 +1200 X-Google-Sender-Auth: g0vQvWTOMFYBAd3eiJ1INdei7XE Message-ID: From: Andrew Thompson To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlzZI2nBPrTiDpX0oCPiA9VdlVy21mlQusTb1XPov3gGixapnH1OyUCvRW0dbAeEusDbh/Q Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234403 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2012 02:22:57 -0000 On 18 April 2012 14:16, Peter Jeremy wrote: > On 2012-Apr-18 01:39:14 +0000, Andrew Thompson wrot= e: >>Log: >> =A0Remove KASSERTS, they do not add any value here since the pointer is = about to >> =A0be derefernced anyway. > > Could you give a bit more background to this commit. =A0You get a crash i= n > both cases but the KASSERT() at least tells you which variable was NULL > without needing to trawl through the crashdump to find what caused the > NULL pointer dereference trap. Out of the five linkstate function pointers in this block of code only these two had a kassert so it was just about making it more consistent. It is something that is not possible within the code anyway (sans memory corruption). Andrew