From owner-svn-src-all@FreeBSD.ORG Wed Apr 18 02:22:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97243106566C for ; Wed, 18 Apr 2012 02:22:57 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 644E78FC16 for ; Wed, 18 Apr 2012 02:22:57 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so8839367pbc.13 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=lvx/BokNlSNHeByrlnWaYSfd1OBQUoLxtxj2anHgT0+T/EPOTAgpB+8L59CNhyJ2MG w9/5nRjQ1AqhnHVLEN0C323ZNxUwHhZDMRpfS6vWHMxMfVwIaoHSEL8l7pHxbBSkQKoX zSbnH7HKXyQHO+kxxQ0VwVvSepzoIVdYlKfqJ4g4RPAnkDOrXUx9IGn365ZPsTVoXw5Q RCxWRQj2dFJaTmvlEhYjV5Jf0nlJgoP+dBAFF702153JDzSiBLzmDRp+M5a/svlcusib LWwx+FdEC1sV8AMoE/vYbIJJc1yhDgZhnb/a+DPIHktk7ti3kQnV9LjvVgSvIuFJuDYj 1ZEg== 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: ALoCoQn6eWw1z+bjjpFdOHtaZkmkvLM8WmkdTvi2syrD4AgyCQFSfi8kR4mxRSwMNEhzMf9W1eZB 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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