Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jun 2008 12:36:14 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Crashes in devfs. Possibly on interface creation/destruction.
Message-ID:  <484F9C8E.1080202@FreeBSD.org>
In-Reply-To: <20080605110447.GB94309@deviant.kiev.zoral.com.ua>
References:  <48470853.6080807@FreeBSD.org> <20080605110447.GB94309@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov wrote:
> Try the following patch. It is against current, there might be further
> races at the device destruction, but may be not. Also, please note that
> devfs in RELENG_6 and RELENG_7/CURRENT are diverged enough to make MFC
> of most bugfixes to RELENG_6 nearly impossible.
> 
> diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
> index e9d0f7b..af9a47d 100644
> --- a/sys/kern/kern_conf.c
> +++ b/sys/kern/kern_conf.c
> @@ -825,9 +825,9 @@ make_dev_alias(struct cdev *pdev, const char *fmt, ...)
>  	va_end(ap);
>  
>  	devfs_create(dev);
> +	dev_dependsl(pdev, dev);
>  	clean_unrhdrl(devfs_inos);
>  	dev_unlock();
> -	dev_depends(pdev, dev);
>  
>  	notify_create(dev);

Looks reasonable. For RELENG_6 it also applies with minor differences.
Put it to the production. As soon as problem shows itself not very
often, positive result probably will be seen only after several weeks of
successive operation.

Thank you.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?484F9C8E.1080202>