summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_socket.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-08-24 20:21:21 +0000
committerjhb <jhb@FreeBSD.org>2004-08-24 20:21:21 +0000
commitcc23ea84d0ad17e7d69a1539947fdc50a38c6af0 (patch)
tree2adb2b3e0072e186b55581dbf999abee2995639a /sys/compat/linux/linux_socket.c
parent1ec5d22c32622b609088a0218cc5e25ef0352c34 (diff)
downloadFreeBSD-src-cc23ea84d0ad17e7d69a1539947fdc50a38c6af0.zip
FreeBSD-src-cc23ea84d0ad17e7d69a1539947fdc50a38c6af0.tar.gz
Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()
directly. This removes a few more users of the stackgap and also marks the syscalls using these wrappers MP safe where appropriate. Tested on: i386 with linux acroread5 Compiled on: i386, alpha LINT
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r--sys/compat/linux/linux_socket.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 47cf5d6..8233db1 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -674,12 +674,7 @@ linux_accept(struct thread *td, struct linux_accept_args *args)
struct close_args /* {
int fd;
} */ c_args;
- struct fcntl_args /* {
- int fd;
- int cmd;
- long arg;
- } */ f_args;
- int error;
+ int error, fd;
if ((error = copyin(args, &linux_args, sizeof(linux_args))))
return (error);
@@ -705,11 +700,9 @@ linux_accept(struct thread *td, struct linux_accept_args *args)
* accepted one, so we must clear the flags in the new descriptor.
* Ignore any errors, because we already have an open fd.
*/
- f_args.fd = td->td_retval[0];
- f_args.cmd = F_SETFL;
- f_args.arg = 0;
- (void)fcntl(td, &f_args);
- td->td_retval[0] = f_args.fd;
+ fd = td->td_retval[0];
+ (void)kern_fcntl(td, fd, F_SETFL, 0);
+ td->td_retval[0] = fd;
return (0);
}
OpenPOWER on IntegriCloud