efi/x86: Add a quirk to support command line arguments on Dell EFI firmware
[linux-2.6-microblaze.git] / kernel / exit.c
index e731c41..733e80f 100644 (file)
@@ -732,7 +732,7 @@ void __noreturn do_exit(long code)
         * mm_release()->clear_child_tid() from writing to a user-controlled
         * kernel address.
         */
-       set_fs(USER_DS);
+       force_uaccess_begin();
 
        if (unlikely(in_atomic())) {
                pr_info("note: %s[%d] exited with preempt_count %d\n",
@@ -1626,6 +1626,22 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, int options,
        return ret;
 }
 
+int kernel_wait(pid_t pid, int *stat)
+{
+       struct wait_opts wo = {
+               .wo_type        = PIDTYPE_PID,
+               .wo_pid         = find_get_pid(pid),
+               .wo_flags       = WEXITED,
+       };
+       int ret;
+
+       ret = do_wait(&wo);
+       if (ret > 0 && wo.wo_stat)
+               *stat = wo.wo_stat;
+       put_pid(wo.wo_pid);
+       return ret;
+}
+
 SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
                int, options, struct rusage __user *, ru)
 {