Date: Thu, 24 Aug 2006 16:48:16 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Marius Strobl <marius@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_mount.c Message-ID: <20060824204816.GA52127@xor.obsecurity.org> In-Reply-To: <200608241852.k7OIqSp2024521@repoman.freebsd.org> References: <200608241852.k7OIqSp2024521@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks! On Thu, Aug 24, 2006 at 06:52:28PM +0000, Marius Strobl wrote: > marius 2006-08-24 18:52:28 UTC >=20 > FreeBSD src repository >=20 > Modified files: > sys/kern vfs_mount.c=20 > Log: > Fix a bug introduced with rev. 1.204; in vfs_donmount() use > copyout(9) instead of copystr(9) for copying the errmsg from > kernel- to user-space. This fixes a panic on sparc64 when > using the nmount(2)-converted mountd(8). > While at it, use bcopy(3) instead of strncpy(3) in the kernel- > to kernel-space case for consistency with vfs_buildopts() and > between kernel- to user-space and kernel- to kernel-space case. > =20 > Revision Changes Path > 1.229 +4 -5 src/sys/kern/vfs_mount.c > http://cvsweb.FreeBSD.org/src/sys/kern/vfs_mount.c.diff?r1=3D1.228&r2=3D1= .229 > | =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 > | RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/vfs_mount.c,v > | retrieving revision 1.228 > | retrieving revision 1.229 > | diff -u -p -r1.228 -r1.229 > | --- src/sys/kern/vfs_mount.c 2006/06/27 14:46:31 1.228 > | +++ src/sys/kern/vfs_mount.c 2006/08/24 18:52:28 1.229 > | @@ -35,7 +35,7 @@ > | */ > | =20 > | #include <sys/cdefs.h> > | -__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/vfs_mo= unt.c,v 1.228 2006/06/27 14:46:31 jhb Exp $"); > | +__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/vfs_mo= unt.c,v 1.229 2006/08/24 18:52:28 marius Exp $"); > | =20 > | #include <sys/param.h> > | #include <sys/conf.h> > | @@ -693,14 +693,13 @@ bail: > | if (errmsg_pos !=3D -1 && ((2 * errmsg_pos + 1) < fsoptions->uio_iovc= nt) > | && errmsg_len > 0 && errmsg !=3D NULL) { > | if (fsoptions->uio_segflg =3D=3D UIO_SYSSPACE) { > | - strncpy(fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, > | - errmsg,=20 > | + bcopy(errmsg, > | + fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, > | fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); > | } else { > | - copystr(errmsg, > | + copyout(errmsg, > | fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, > | - fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len, > | - NULL); > | + fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); > | }=20 > | } > | =20 >=20 --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE7hCQWry0BWjoQKURAttRAKDUi9BXgVUPaefCyfa77dE3aN3qRwCg3qtl YMDLGiOUnmwtBNMVwqrJhk4= =eaex -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060824204816.GA52127>