diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-07-16 06:38:56 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 16:05:38 (GMT) |
commit | c43990162fc7f9d2f15a12797fdc6f9c0905f704 (patch) | |
tree | 64f8b776c4807da48971f3c24ca157c5e6ab921f /arch/um/drivers | |
parent | 42a359e31a0e438b5b978a8f0fecdbd3c86bb033 (diff) | |
download | linux-fsl-qoriq-c43990162fc7f9d2f15a12797fdc6f9c0905f704.tar.xz |
uml: simplify helper stack handling
run_helper and run_helper_thread had arguments which were the same in all
callers. run_helper's stack_out was always NULL and run_helper_thread's
stack_order was always 0. These are now gone, and the constants folded
into the code.
Also fixed leaks of the helper stack in the AIO and SIGIO code.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/chan_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/harddog_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/net_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/port_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slip_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slirp_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/xterm.c | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 8b81bd5..4d438f3 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c @@ -161,7 +161,7 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out, * problem with /dev/net/tun, which if held open by this * thread, prevents the TUN/TAP device from being reused. */ - err = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out, 0); + err = run_helper_thread(winch_thread, &data, CLONE_FILES, stack_out); if(err < 0){ printk("fork of winch_thread failed - errno = %d\n", -err); goto out_close; diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c index 5eeecf89..1171790 100644 --- a/arch/um/drivers/harddog_user.c +++ b/arch/um/drivers/harddog_user.c @@ -68,7 +68,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) args = pid_args; } - pid = run_helper(pre_exec, &data, args, NULL); + pid = run_helper(pre_exec, &data, args); os_close_file(out_fds[0]); os_close_file(in_fds[1]); diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 3503cff..6fa948b 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c @@ -187,7 +187,7 @@ static int change_tramp(char **argv, char *output, int output_len) } pe_data.close_me = fds[0]; pe_data.stdout = fds[1]; - pid = run_helper(change_pre_exec, &pe_data, argv, NULL); + pid = run_helper(change_pre_exec, &pe_data, argv); if (pid > 0) /* Avoid hang as we won't get data in failure case. */ read_output(fds[0], output, output_len); diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c index 3f6357d..29250be 100644 --- a/arch/um/drivers/port_user.c +++ b/arch/um/drivers/port_user.c @@ -188,7 +188,7 @@ int port_connection(int fd, int *socket, int *pid_out) { .sock_fd = new, .pipe_fd = socket[1] }); - err = run_helper(port_pre_exec, &data, argv, NULL); + err = run_helper(port_pre_exec, &data, argv); if(err < 0) goto out_shutdown; diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index 78f0e51..edc2de3 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c @@ -85,7 +85,7 @@ static int slip_tramp(char **argv, int fd) pe_data.stdin = fd; pe_data.stdout = fds[1]; pe_data.close_me = fds[0]; - err = run_helper(slip_pre_exec, &pe_data, argv, NULL); + err = run_helper(slip_pre_exec, &pe_data, argv); if(err < 0) goto out_close; pid = err; diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c index 39f889f..0e462f6 100644 --- a/arch/um/drivers/slirp_user.c +++ b/arch/um/drivers/slirp_user.c @@ -42,7 +42,7 @@ static int slirp_tramp(char **argv, int fd) pe_data.stdin = fd; pe_data.stdout = fd; - pid = run_helper(slirp_pre_exec, &pe_data, argv, NULL); + pid = run_helper(slirp_pre_exec, &pe_data, argv); return(pid); } diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 3591284..fd817e5 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c @@ -132,7 +132,7 @@ static int xterm_open(int input, int output, int primary, void *d, } sprintf(title, data->title, data->device); - pid = run_helper(NULL, NULL, argv, NULL); + pid = run_helper(NULL, NULL, argv); if (pid < 0) { err = pid; printk(UM_KERN_ERR "xterm_open : run_helper failed, " |