From owner-svn-src-head@freebsd.org Thu Apr 21 17:52:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE59B16A9C for ; Thu, 21 Apr 2016 17:52:57 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5113411AC for ; Thu, 21 Apr 2016 17:52:57 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by mail-ig0-x22d.google.com with SMTP id g8so89303971igr.0 for ; Thu, 21 Apr 2016 10:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clockworksquid.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sZqqS6Trh5/l6f+WbJON4hsLewyEZtKhJwXAOTFHtlQ=; b=YBkGcW7qaMnP3N+DbUkgAvyqGjN988EWbDMUJJnOq9NUp7vDn3tc5+cdWbsbOa5BV8 gCAJxOH0YfIMerXcStpO0LzkbeKH3uYerVYRtys9LMlBvO5nGlD6hbp6Lawo2uhwwpow TVBGsQOAnI4WWlyilndqS+JVt/dLH2yc7AaME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sZqqS6Trh5/l6f+WbJON4hsLewyEZtKhJwXAOTFHtlQ=; b=NV7cKaU1/3rjrZOkQtoX1y86ekzSD2opX0o9spaclJ6hp55Sq8O44BA3FOmf6V5WgB s16vh6FMOXsPaknq9mLzFY8tsb37NIwpuT4N+i13wzuteVN2c6u5rnLxIr48j2SuDWvL oX5TyVxoZJIoP2Y7evxNPrglfbFeYYBOR0nF97Jx2yM1er9b8ffENUuBvfwlNBKxQW93 gMxPwMmzkzMOWg9DzYQ7Hqt8OMWCG4i2YTpX1iaNnfZP4ejSgf6FjHA7p8FxVyiFHnSb 83R94H4m2LnwanFjNhtdopWkMAP+g0OyBLQs/VRIzmudbDUzcFF14VuLhTRkq1osRFRT SUCg== X-Gm-Message-State: AOPr4FVicnn4wE6sR6eqmul4VnWlIS5NH/o5e2UtGUSwfuDWQAdlpl0uOwyhPJiP1kcDm/QWJRA0LQFkuuyDNA== X-Received: by 10.50.6.110 with SMTP id z14mr5261931igz.33.1461261176750; Thu, 21 Apr 2016 10:52:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.15.66 with HTTP; Thu, 21 Apr 2016 10:52:37 -0700 (PDT) In-Reply-To: <57190C47.8070106@selasky.org> References: <201604211604.u3LG4wmT035874@repo.freebsd.org> <57190C47.8070106@selasky.org> From: Juli Mallett Date: Thu, 21 Apr 2016 10:52:37 -0700 Message-ID: Subject: Re: svn commit: r298412 - head/sys/ofed/drivers/infiniband/core To: Hans Petter Selasky Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 21 Apr 2016 17:52:57 -0000 On Thu, Apr 21, 2016 at 10:22 AM, Hans Petter Selasky wrote: > On 04/21/16 19:12, Ngie Cooper wrote: >> >> Please put the "deadcode" back. It will crash now if it's given an >> invalid address family (or none are configured in the kernel) when it >> tries to do the memcpy below. > > > If you look a few lines up in the file, not the patch, you'll see that there > already is a switch case which catches this. > > OK? Then there should be an assertion or something else of that sort (I forget if we have a __builtin_unreachable()-alike macro in the kernel; the lint(1)y NOTREACHED isn't as nice as actual code) so that it is apparent to a human that this case cannot be reached. The presence of a do-nothing default case is not typically indicative of unreachable code.