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
[EMAIL PROTECTED]
--- 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message