Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 14:34:29 +0300 (EEST)
From:      Adrian Penisoara <ady@freebsd.ady.ro>
To:        Maxim Konovalov <maxim@macomnet.ru>
Cc:        freebsd-current@freebsd.org
Subject:   Re: panic:bremfree with today's current and linux-netscape
Message-ID:  <Pine.BSF.4.10.10204221434020.71629-100000@ady.warpnet.ro>
In-Reply-To: <20020421210807.T76833-100000@news1.macomnet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

  YES, this patch fixed my problem!

 Thanks,
 Ady (@warpnet.ro)
_______________________________________________________________________
| Programming in BASIC causes brain damage.                           |
|   (Edsger Wybe Dijkstra)                                            |

On Sun, 21 Apr 2002, Maxim Konovalov wrote:

> 
> As Adrian Penisoara already reported
> 
> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=19645+0+current/freebsd-current
> 
> there is panic in -current. I believe it is related to the next
> commit:
> 
> nectar      2002/04/18 17:45:29 PDT
> 
>   Modified files:
>     sys/kern             kern_descrip.c kern_exec.c
>     sys/sys              filedesc.h
>   Log:
>   When exec'ing a set[ug]id program, make sure that the stdio file descriptors
>   (0, 1, 2) are allocated by opening /dev/null for any which are not already
>   open.
> 
>   Reviewed by:    alfred, phk
>   MFC after:      2 days
> 
> Here is my workaround but I am not sure is it correct or not. Seems
> falloc() takes care about locking itself.
> 
> Index: src/sys/kern/kern_descrip.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v
> retrieving revision 1.138
> diff -u -r1.138 kern_descrip.c
> --- src/sys/kern/kern_descrip.c	20 Apr 2002 12:02:52 -0000	1.138
> +++ src/sys/kern/kern_descrip.c	21 Apr 2002 17:04:58 -0000
> @@ -1528,9 +1528,7 @@
>  		if (fdp->fd_ofiles[i] != NULL)
>  			continue;
>  		if (devnull < 0) {
> -			FILEDESC_LOCK(fdp);
>  			error = falloc(td, &fp, &fd);
> -			FILEDESC_UNLOCK(fdp);
>  			if (error != 0)
>  				break;
>  			NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, "/dev/null",
> 
> %%%
> 
> -- 
> Maxim Konovalov, MAcomnet, Internet Dept., system engineer
> phone: +7 (095) 796-9079, mailto:maxim@macomnet.ru
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10204221434020.71629-100000>