Revert "CHROMIUM: android: binder: Fix potential scheduling-while-atomic"
authorDanny Wood <danwood76@gmail.com>
Tue, 26 Feb 2019 08:16:10 +0000 (08:16 +0000)
committerDanny Wood <danwood76@gmail.com>
Tue, 26 Feb 2019 11:36:29 +0000 (11:36 +0000)
This reverts commit 0e13ca5f2efc20fb5edf1985f0fe724f037923f5.

drivers/android/binder.c

index a7f6fb87a15b29b2cdb57b97f31c7ef22ce179f7..38c2f2ec53b9727091f537e8e9b2c79bd9e5b379 100644 (file)
@@ -417,7 +417,6 @@ static int task_get_unused_fd_flags(struct binder_proc *proc, int flags)
        struct files_struct *files = proc->files;
        unsigned long rlim_cur;
        unsigned long irqs;
-       int ret;
 
        if (files == NULL)
                return -ESRCH;
@@ -428,11 +427,7 @@ static int task_get_unused_fd_flags(struct binder_proc *proc, int flags)
        rlim_cur = task_rlimit(proc->tsk, RLIMIT_NOFILE);
        unlock_task_sighand(proc->tsk, &irqs);
 
-       preempt_enable_no_resched();
-       ret = __alloc_fd(files, 0, rlim_cur, flags);
-       preempt_disable();
-
-       return ret;
+       return __alloc_fd(files, 0, rlim_cur, flags);
 }
 
 /*
@@ -441,11 +436,8 @@ static int task_get_unused_fd_flags(struct binder_proc *proc, int flags)
 static void task_fd_install(
        struct binder_proc *proc, unsigned int fd, struct file *file)
 {
-       if (proc->files) {
-               preempt_enable_no_resched();
+       if (proc->files)
                __fd_install(proc->files, fd, file);
-               preempt_disable();
-       }
 }
 
 /*