Date: Wed, 22 Nov 2000 23:30:48 -0500 From: "Danny J. Zerkel" <dzerkel@columbus.rr.com> To: FreeBSD Current <freebsd-current@FreeBSD.ORG>, dillon@FreeBSD.ORG Subject: COMPAT_SVR4 broken after uipc_syscalls commit (1.77) Message-ID: <3A1C9D77.57A09D56@columbus.rr.com>
next in thread | raw e-mail | index | archive | help
The recent renaming of getsock() to holdsock() broke COMPAT_SVR4 (and MISC_FS). I have made a quick stab at fixing it up in src/sys/compat/svr4/svr4_stream.c, but I'm a little hesitent to figure out what is going on in src/sys/miscfs/portal/portal_vfsops.c. Note: I don't actually use COMPAT_SVR4 for anything, it just happened to be in my config and broke. Any way, here is a possible fix. -- Danny J. Zerkel dzerkel@columbus.rr.com --- svr4_stream.c.orig Thu Aug 31 18:54:05 2000 +++ svr4_stream.c Wed Nov 22 22:39:00 2000 @@ -162,7 +162,7 @@ struct uio ktruio; #endif - error = getsock(p->p_fd, s, &fp); + error = holdsock(p->p_fd, s, &fp); if (error) return (error); auio.uio_iov = mp->msg_iov; @@ -174,13 +174,17 @@ auio.uio_resid = 0; iov = mp->msg_iov; for (i = 0; i < mp->msg_iovlen; i++, iov++) { - if ((auio.uio_resid += iov->iov_len) < 0) + if ((auio.uio_resid += iov->iov_len) < 0) { + fdrop(fp, p); return (EINVAL); + } } if (mp->msg_name) { error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); - if (error) + if (error) { + fdrop(fp, p); return (error); + } } else to = 0; if (mp->msg_control) { @@ -229,6 +233,7 @@ bad: if (to) FREE(to, M_SONAME); + fdrop(fp, p); return (error); } @@ -253,7 +258,7 @@ struct uio ktruio; #endif - error = getsock(p->p_fd, s, &fp); + error = holdsock(p->p_fd, s, &fp); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A1C9D77.57A09D56>