summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2006-04-01 15:25:01 +0000
committerRobert Watson <rwatson@FreeBSD.org>2006-04-01 15:25:01 +0000
commitf7f45ac8e2adcda53ed2c3f4d3801fb2657c3a4b (patch)
tree3609515ef39e3434fdd6f469dbb7ffb40eacc983
parentac45e92ff2195eb1addc4debd946c83ac6baa356 (diff)
Notes
-rw-r--r--sys/compat/linux/linux_socket.c4
-rw-r--r--sys/compat/svr4/svr4_stream.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 6e30b4361a93f..e3d303279afec 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -662,6 +662,10 @@ linux_connect(struct thread *td, struct linux_connect_args *args)
* Linux doesn't return EISCONN the first time it occurs,
* when on a non-blocking socket. Instead it returns the
* error getsockopt(SOL_SOCKET, SO_ERROR) would return on BSD.
+ *
+ * XXXRW: Instead of using fgetsock(), check that it is a
+ * socket and use the file descriptor reference instead of
+ * creating a new one.
*/
NET_LOCK_GIANT();
error = fgetsock(td, linux_args.s, &so, &fflag);
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index bd6fa5af0e136..35d7972984f81 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -167,6 +167,10 @@ svr4_sendit(td, s, mp, flags)
struct uio *ktruio = NULL;
#endif
+ /*
+ * XXXRW: Instead of using fgetsock(), just rely on the file
+ * descriptor reference.
+ */
if ((error = fgetsock(td, s, &so, NULL)) != 0)
return (error);
@@ -263,6 +267,10 @@ svr4_recvit(td, s, mp, namelenp)
struct uio *ktruio = NULL;
#endif
+ /*
+ * XXXRW: Instead of using fgetsock(), just rely on the file
+ * descriptor reference.
+ */
if ((error = fgetsock(td, s, &so, NULL)) != 0)
return (error);