From 2ca25ab53ec018a64ecbf89e780fe9ff4298811e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 24 Aug 2004 20:21:21 +0000 Subject: 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 --- sys/compat/linux/linux_socket.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'sys/compat/linux/linux_socket.c') diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 47cf5d6f22fd..8233db1744c2 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); } -- cgit v1.3