From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 07:42:04 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5850068F; Sat, 13 Jun 2015 07:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (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 17E66AE9; Sat, 13 Jun 2015 07:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkx62 with SMTP id 62so27722883qkx.3; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TMSJ6xkpq8RFEU8vIbIS5M5bVLwhPWqqJaJeipm+Afk=; b=MXuoos6VYT7vmDoYylWCz5mrWx9ucga80ss6dhaH3+p0pqM509AGmZqqWyYtwc0lqO mrqMNpw27CPtmJHjXfsfO9NnVMabZcJZXHrQZ4QDtYRpRWLOq94IDRzhxlB6u/Y+j0Nm 4PhE9bY06sJs4DeGqBSqWBy8L/56hrevZTU95jlKv25yYlFNmQ0cK/V6YFSS7/jSk7Re zCtHtgeqfCKbIfP4F/j67PDeRjxTiAcu9wxXFf7lR4p2dgNnb5fnrCyoj49S3Pj4zX3g UOawNNvzymxANRYnNgHCl7wtK7lOz5tMXAUR7Shkf0LskUo1cWmPqpsN2OYphrRrYcc2 wq/g== MIME-Version: 1.0 X-Received: by 10.55.52.12 with SMTP id b12mr37696615qka.22.1434181323137; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) In-Reply-To: <20150613073746.GJ2080@kib.kiev.ua> References: <201506130555.t5D5tQij003839@svn.freebsd.org> <20150613073746.GJ2080@kib.kiev.ua> Date: Sat, 13 Jun 2015 00:42:03 -0700 Message-ID: Subject: Re: svn commit: r284336 - head/sys/dev/acpi_support From: NGie Cooper To: Konstantin Belousov Cc: Allan Jude , "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.20 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: Sat, 13 Jun 2015 07:42:04 -0000 On Sat, Jun 13, 2015 at 12:37 AM, Konstantin Belousov wrote: > On Sat, Jun 13, 2015 at 05:55:26AM +0000, Allan Jude wrote: >> Author: allanjude (doc committer) >> Date: Sat Jun 13 05:55:26 2015 >> New Revision: 284336 >> URL: https://svnweb.freebsd.org/changeset/base/284336 >> >> Log: >> acpi_ibm.ko panics if SMBIOS information is not available >> >> Add a check for NULL before strcmp on smbios information incase it is not populated >> >> Differential Revision: https://reviews.freebsd.org/D2750 >> Reviewed by: ngie, jhb >> Approved by: rpaulo >> Sponsored by: ScaleEngine Inc. >> >> Modified: >> head/sys/dev/acpi_support/acpi_ibm.c >> >> Modified: head/sys/dev/acpi_support/acpi_ibm.c >> ============================================================================== >> --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) >> +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) >> @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) >> /* Enable per-model events. */ >> maker = kern_getenv("smbios.system.maker"); >> product = kern_getenv("smbios.system.product"); >> + if (maker != NULL && product != NULL) >> + goto nosmbios; > This looks reversed. I would expect the condition to be > if (maker == NULL || product == NULL) > goto ...; +1