Date: Sat, 25 Dec 2004 15:17:52 +0100 From: Stefan Farfeleder <stefanf@FreeBSD.org> To: Julian Elischer <julian@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb ugen.c Message-ID: <20041225141749.GA585@wombat.fafoe.narf.at> In-Reply-To: <200412120227.iBC2RUNt005869@repoman.freebsd.org> References: <200412120227.iBC2RUNt005869@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--qlTNgmc+xy1dBmNv Content-Type: multipart/mixed; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 12, 2004 at 02:27:30AM +0000, Julian Elischer wrote: > julian 2004-12-12 02:27:30 UTC >=20 > FreeBSD src repository >=20 > Modified files: > sys/dev/usb ugen.c=20 > Log: > Changes to cache endpoint descriptors for all the interfaces. this info= rmation > is not always available if we change interfaces. This causes a null pointer dereference in idestroy_dev() if I try to get pictures from my camera with gphoto. I think it is due to both ugen_do_ioctl() and ugen_set_config() calling ugen_destroy_devnodes(). Here's a fix which works for me. Stefan --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ugen.diff" Index: src/sys/dev/usb/ugen.c =================================================================== RCS file: /b/ncvs/src/sys/dev/usb/ugen.c,v retrieving revision 1.101 diff -I.svn -u -r1.101 ugen.c --- src/sys/dev/usb/ugen.c 22 Dec 2004 17:31:44 -0000 1.101 +++ src/sys/dev/usb/ugen.c 25 Dec 2004 13:59:13 -0000 @@ -1329,9 +1329,6 @@ case USB_SET_CONFIG: if (!(flag & FWRITE)) return (EPERM); -#if defined(__FreeBSD__) - ugen_destroy_devnodes(sc); -#endif err = ugen_set_config(sc, *(int *)addr); switch (err) { case USBD_NORMAL_COMPLETION: --0F1p//8PRICkK4MW-- --qlTNgmc+xy1dBmNv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBzXaLMZ+LKIvv0V8RAgNaAJ0ZlUaincbKlqUDFO016sgVRCVXQwCfRpa6 3kbKp8swREYyoOtdClZaafI= =OsiR -----END PGP SIGNATURE----- --qlTNgmc+xy1dBmNv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041225141749.GA585>