From willow@xloling.org  Sun Aug 14 22:54:22 2005
Return-Path: <willow@xloling.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4585516A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Aug 2005 22:54:22 +0000 (GMT)
	(envelope-from willow@xloling.org)
Received: from xloling.org (willow.xloling.org [82.67.83.132])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8BEC843D46
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Aug 2005 22:54:21 +0000 (GMT)
	(envelope-from willow@xloling.org)
Received: from xloling.org (localhost [127.0.0.1])
	by xloling.org (8.13.3/8.13.1) with ESMTP id j7EMsVFE088878
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Aug 2005 00:54:32 +0200 (CEST)
	(envelope-from willow@xloling.org)
Received: (from willow@localhost)
	by xloling.org (8.13.3/8.13.1/Submit) id j7EMsV9R088863;
	Mon, 15 Aug 2005 00:54:31 +0200 (CEST)
	(envelope-from willow)
Message-Id: <200508142254.j7EMsV9R088863@xloling.org>
Date: Mon, 15 Aug 2005 00:54:31 +0200 (CEST)
From: Antoine Pelisse <apelisse@gmail.com>
Reply-To: Antoine Pelisse <apelisse@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Panic in kern_exec.c
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         84934
>Category:       kern
>Synopsis:       [PATCH] Panic in kern_exec.c
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 23:00:32 GMT 2005
>Closed-Date:    Sun Aug 14 23:33:28 GMT 2005
>Last-Modified:  Sun Aug 14 23:33:28 GMT 2005
>Originator:     Antoine Pelisse
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Xloling	
>Environment:
System: FreeBSD gordon.xloling.org 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sun Aug 14 23:48:35 CEST 2005 i386 
>Description:
	Fix for panic:
	http://people.freebsd.org/~pho/stress/log/cons151.html
>How-To-Repeat:
>Fix:
--- kern/kern_exec.c.orig       Sun Aug 14 22:39:41 2005
+++ kern/kern_exec.c    Sun Aug 14 22:43:16 2005
@@ -667,7 +667,14 @@
 
        /* Cache arguments if they fit inside our allowance */
        if (ps_arg_cache_limit >= i + sizeof(struct pargs)) {
+               /*
+                * the lock needs to be released as begin_argv is
+                * stored in pageable memory (allocated with
+                * kmem_alloc_wait)
+                */
+               PROC_UNLOCK(p);
                bcopy(imgp->args->begin_argv, newargs->ar_args, i);
+               PROC_LOCK(p);
                p->p_args = newargs;
                newargs = NULL;
        }

Feel free to modify the comment,

Regards.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Aug 14 23:33:04 GMT 2005 
State-Changed-Why:  
Duplicate of kern/84935. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84934 
>Unformatted:
