Re: svn commit: r222274 - stable/8/sys/kern
MFC to 7-STABLE? On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 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 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -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) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r222274 - stable/8/sys/kern
On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 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 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -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) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org pgpDGF0sgjEYW.pgp Description: PGP signature
Re: svn commit: r222274 - stable/8/sys/kern
this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 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 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -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) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r222274 - stable/8/sys/kern
On Wednesday 25 May 2011 14:07:10 Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Hi, Have you thought about: /usr/ports/multimedia/cuse4bsd ? Create some threads and: struct cuse_dev * cuse_dev_create(const struct cuse_methods *mtod, void *priv0, void *priv1, uid_t, gid_t, int permission, const char *fmt, ...) This function creates a new character device according to the given parameters. This function returns a valid cuse_dev structure pointer on success or NULL on failure. The device name can only contain a-z, A-Z, 0-9, dot, / and underscore characters. and void cuse_dev_destroy(struct cuse_dev *) This functions destroys a previ- ously created character device. Should also work under FreeBSD 7.x from what I know. --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r222274 - stable/8/sys/kern
On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Only if the unload of any of the listed modules caused destruction of some devfs node. May be, the easiest for 7 is to create some md(4) device and then destroy it. On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. pgpll43Wpc0yQ.pgp Description: PGP signature
Re: svn commit: r222274 - stable/8/sys/kern
On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Only if the unload of any of the listed modules caused destruction of some devfs node. May be, the easiest for 7 is to create some md(4) device and then destroy it. On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. Runned 3 times the attached test script. The system remained stable. FreeBSD pandora-d 7.4-STABLE FreeBSD 7.4-STABLE #83 r74=49d86ad: Wed May 25 17:49:38 CEST 2011 root@pandora-d:/usr/obj/usr/src/sys/stable amd64 commit 49d86ad84d6347006ef359ffa0fa0e575d700246 Author: kib kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Date: Wed May 25 03:25:14 2011 + 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. git-svn-id: svn://svn.freebsd.org/base/stable/8@74 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 09859aa..3207438 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -874,6 +874,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); @@ -890,7 +892,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) { devfs_test.log.xz Description: Binary data ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r222274 - stable/8/sys/kern
Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 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 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -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) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org