From nobody@FreeBSD.org  Tue Oct  4 12:51:06 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00EB7106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Oct 2011 12:51:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id CC5758FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Oct 2011 12:51:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p94Cp5Sq095974
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Oct 2011 12:51:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p94Cp5Gr095973;
	Tue, 4 Oct 2011 12:51:05 GMT
	(envelope-from nobody)
Message-Id: <201110041251.p94Cp5Gr095973@red.freebsd.org>
Date: Tue, 4 Oct 2011 12:51:05 GMT
From: Patrick Dorion <dorionpatrick@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Stack overflow in gptzfsboot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         161280
>Category:       kern
>Synopsis:       [zfs] Stack overflow in gptzfsboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 04 13:00:20 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Oct 10 07:40:09 UTC 2011
>Originator:     Patrick Dorion
>Release:        8.2-RELEASE-amd_64
>Organization:
>Environment:
FreeBSD 8.2-RELEASE .../GENERIC amd64
>Description:
An unhandled exception causes a stack overflow in gptzfsboot and possibly in its parent and siblings.
>How-To-Repeat:
- Add 'loader_conf_files="/boot/device.hints /boot/loader.conf' to /boot/loader.conf;
- Restart the machine.
>Fix:
- Unreference the file.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Oct 10 05:04:39 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161280 

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, dorionpatrick@gmail.com
Cc:  
Subject: Re: kern/161280: [zfs] Stack overflow in gptzfsboot
Date: Mon, 10 Oct 2011 10:38:10 +0300

 I believe that the problem happens in (zfs)loader, not (gpt)(zfs)boot code.
 
 You shot your foot by adding /boot/loader.conf to loader_conf_files, which
 caused a recursion in parsing of loader.conf.
 
 -- 
 Andriy Gapon
>Unformatted:
