X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Fum%2Fdrivers%2Fslip_user.c;h=a1c2d2c98a942b9798994444f00501ddd5678132;hb=2aedd192f799c362ccefc3c316f0c4bd5154126b;hp=5f06204d68719d2ac0fba7bb7a9a8e8b38bfcee3;hpb=2843483d2eb02ad104edbe8b2429fb6a39d25063;p=karo-tx-linux.git diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index 5f06204d6871..a1c2d2c98a94 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c @@ -77,7 +77,7 @@ static int slip_tramp(char **argv, int fd) { struct slip_pre_exec_data pe_data; char *output; - int status, pid, fds[2], err, output_len; + int pid, fds[2], err, output_len; err = os_pipe(fds, 1, 0); if (err < 0) { @@ -96,7 +96,7 @@ static int slip_tramp(char **argv, int fd) pid = err; output_len = UM_KERN_PAGE_SIZE; - output = kmalloc(output_len, UM_GFP_KERNEL); + output = uml_kmalloc(output_len, UM_GFP_KERNEL); if (output == NULL) { printk(UM_KERN_ERR "slip_tramp : failed to allocate output " "buffer\n"); @@ -109,15 +109,7 @@ static int slip_tramp(char **argv, int fd) read_output(fds[0], output, output_len); printk("%s", output); - CATCH_EINTR(err = waitpid(pid, &status, 0)); - if (err < 0) - err = errno; - else if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) { - printk(UM_KERN_ERR "'%s' didn't exit with status 0\n", argv[0]); - err = -EINVAL; - } - else err = 0; - + err = helper_wait(pid); close(fds[0]); out_free: