From owner-cvs-src@FreeBSD.ORG Sat Dec 25 14:17:59 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80A9416A4CE; Sat, 25 Dec 2004 14:17:59 +0000 (GMT) Received: from fafoe.narf.at (chello084113209090.6.14.vie.surfer.at [84.113.209.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01F6543D1F; Sat, 25 Dec 2004 14:17:59 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id 0B8C041AC; Sat, 25 Dec 2004 15:17:53 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 1A0FB13F; Sat, 25 Dec 2004 15:17:53 +0100 (CET) Date: Sat, 25 Dec 2004 15:17:52 +0100 From: Stefan Farfeleder To: Julian Elischer Message-ID: <20041225141749.GA585@wombat.fafoe.narf.at> References: <200412120227.iBC2RUNt005869@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qlTNgmc+xy1dBmNv" Content-Disposition: inline In-Reply-To: <200412120227.iBC2RUNt005869@repoman.freebsd.org> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb ugen.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2004 14:17:59 -0000 --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--