From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 05:55:27 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 1303C60D; Sat, 13 Jun 2015 05:55:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00AABF0A; Sat, 13 Jun 2015 05:55:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5D5tQ7Y003840; Sat, 13 Jun 2015 05:55:26 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5D5tQij003839; Sat, 13 Jun 2015 05:55:26 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201506130555.t5D5tQij003839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 13 Jun 2015 05:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284336 - head/sys/dev/acpi_support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 05:55:27 -0000 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; + for (i = 0; i < nitems(acpi_ibm_models); i++) { if (strcmp(maker, acpi_ibm_models[i].maker) == 0 && strcmp(product, acpi_ibm_models[i].product) == 0) { @@ -494,6 +497,8 @@ acpi_ibm_attach(device_t dev) ACPI_SERIAL_END(ibm); } } + +nosmbios: freeenv(maker); freeenv(product);