Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d5e73af authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "CHROMIUM: android: binder: Fix potential scheduling-while-atomic"

parents 934a7620 821e02f2
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ 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;
@@ -389,7 +390,11 @@ 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);

	return __alloc_fd(files, 0, rlim_cur, flags);
	preempt_enable_no_resched();
	ret = __alloc_fd(files, 0, rlim_cur, flags);
	preempt_disable();

	return ret;
}

/*
@@ -398,8 +403,11 @@ 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)
	if (proc->files) {
		preempt_enable_no_resched();
		__fd_install(proc->files, fd, file);
		preempt_disable();
	}
}

/*