From owner-svn-src-all@freebsd.org Thu Apr 21 17:52:57 2016 Return-Path: Delivered-To: svn-src-all@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 7F575B16A9B for ; Thu, 21 Apr 2016 17:52:57 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (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 510F511AA for ; Thu, 21 Apr 2016 17:52:57 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by mail-ig0-x229.google.com with SMTP id f1so164045284igr.1 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=hLz5XNdKkmwWJUlgZFGJbLue73f5mjm7JFjoBpI002U7Iem7chB5iKGKjYcfj3ZZNs FtD8CLmANLwzxUj6xSE2RPD8T5mnPAv8lCUYHu25jNJTKlfe2MkkDTvw7R7D6Wt705tW LwLkX8mutfCPQkSHkFc9ZC2QAxT8CjfdogGbONIPig0bzGUJs0CKJtYK/Bzrt7qtsIN9 N0aO8dujqioqkw+IWQpOlho4bGv4kN9rjSpDEyX7fW7N8DetijPniXBq3JGVgOej2f3P iSL5Z5rWuiJ9kSBZ5s8Hn/ux7q+9K5k/CP6q1gnskFmWehHxiPHAVk1Kd6b1j9Gg8EOd 2Opw== X-Gm-Message-State: AOPr4FWyxZ6CL3ssmzypkCXy9zLuR2E8U3BwGGrX75Dis3X4iCTe+s4dAEIrHIhN9vWkf16Gm3m7lhuIAJLjRg== 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-all@freebsd.org X-Mailman-Version: 2.1.21 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: 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.