Date: Wed, 14 Jan 2015 20:57:48 +0300 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: Hans Petter Selasky <hselasky@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277179 - in head/sys: dev/usb kern sys Message-ID: <54B6AE1C.5010405@FreeBSD.org> In-Reply-To: <201501141404.t0EE4UR7008401@svn.freebsd.org> References: <201501141404.t0EE4UR7008401@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 14.01.2015 17:04, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 14 14:04:29 2015 > New Revision: 277179 > URL: https://svnweb.freebsd.org/changeset/base/277179 >=20 > Log: > Add a kernel function to delist our kernel character devices, so that= > the device name can be re-used right away in case we are destroying > the character devices in the background. > =20 > MFC after: 4 days > Reported by: dchagin@ >=20 > Modified: > head/sys/dev/usb/usb_device.c > head/sys/kern/kern_conf.c > head/sys/sys/conf.h >=20 > Modified: head/sys/dev/usb/usb_device.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * > usb_destroy_dev_sync(pd); > return; > } > -=09 > + > + /* make sure we can re-use the device name */ > + delist_dev(pd->cdev); > + > USB_BUS_LOCK(bus); > LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); > /* get cleanup going */ >=20 > Modified: head/sys/kern/kern_conf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) > } > } > =20 > +static void > +delist_dev_locked(struct cdev *dev) > +{ > + struct cdev *child; > + devfs_destroy(dev); > + LIST_FOREACH(child, &dev->si_children, si_siblings) > + delist_dev_locked(child); > +} It looks a bit strange. First you call destroy(dev), then you are trying enumerate its children. It is ok? --=20 WBR, Andrey V. Elsukov --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUtq4dAAoJEAHF6gQQyKF6Dq0H/3C/56a4gNkHOzh+VJlDXHlT hdllrSTg6Os4I+elYlviyOBKthU7hFOlx0NKwt+J5VL7UVAgLiUcHM9jrpFka+9a 2trKZxKUUbvYqRuL5iaPFH2m4RxfuldgFD6GlkallOO1J4tBVZaPIW/g85M+PK1i u92k+tVjLaK3iepf1L/OeYXdSjIAM8TapsE8S5KmtB7yr7t1ExrxlxRDGc+eq1m7 hFXxo4KSYcyvBv3ltybBU7fIf0F81ngQdyuHVBx6sVG78NCeB6X+XkdOc8a/WZ6P xzNtMcuCnwEUAWWoQcEWnAHAKS+DV78g1eG4nOB5MPAO1rlslyHlshlbca9fzrQ= =JQPf -----END PGP SIGNATURE----- --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54B6AE1C.5010405>