MFC to 7-STABLE?

On 5/25/11, Konstantin Belousov <[email protected]> wrote:
> Author: kib
> Date: Wed May 25 03:25:14 2011
> New Revision: 222274
> URL: http://svn.freebsd.org/changeset/base/222274
>
> Log:
>   MFC r222086:
>   The protection against the race with dev_rel(), introduced in r163328,
>   should be extended to cover destroy_devl() calls for the children of the
>   destroyed dev.
>
> Modified:
>   stable/8/sys/kern/kern_conf.c
> Directory Properties:
>   stable/8/sys/   (props changed)
>   stable/8/sys/amd64/include/xen/   (props changed)
>   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/8/sys/contrib/dev/acpica/   (props changed)
>   stable/8/sys/contrib/pf/   (props changed)
>
> Modified: stable/8/sys/kern/kern_conf.c
> ==============================================================================
> --- stable/8/sys/kern/kern_conf.c     Wed May 25 01:04:12 2011        
> (r222273)
> +++ stable/8/sys/kern/kern_conf.c     Wed May 25 03:25:14 2011        
> (r222274)
> @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev)
>       /* Remove name marking */
>       dev->si_flags &= ~SI_NAMED;
>
> +     dev->si_refcount++;     /* Avoid race with dev_rel() */
> +
>       /* If we are a child, remove us from the parents list */
>       if (dev->si_flags & SI_CHILD) {
>               LIST_REMOVE(dev, si_siblings);
> @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev)
>               dev->si_flags &= ~SI_CLONELIST;
>       }
>
> -     dev->si_refcount++;     /* Avoid race with dev_rel() */
>       csw = dev->si_devsw;
>       dev->si_devsw = NULL;   /* already NULL for SI_ALIAS */
>       while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) {
> _______________________________________________
> [email protected] mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
> To unsubscribe, send any mail to "[email protected]"
>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to