Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130457
b: refs/heads/master
c: 1176e83
h: refs/heads/master
i:
  130455: 180118c
v: v3
  • Loading branch information
Oleg Nesterov authored and Greg Kroah-Hartman committed Jan 28, 2009
1 parent a7c293a commit b1ed8a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 191805ac41a63929003faa33365027d3fb924d71
refs/heads/master: 1176e83aff6f15b6ae4d1b53c16124884ad29363
10 changes: 5 additions & 5 deletions trunk/drivers/staging/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ int task_get_unused_fd_flags(struct task_struct *tsk, int flags)
int fd, error;
struct fdtable *fdt;
unsigned long rlim_cur;
unsigned long irqs;

if (files == NULL)
return -ESRCH;
Expand All @@ -335,12 +336,11 @@ int task_get_unused_fd_flags(struct task_struct *tsk, int flags)
* N.B. For clone tasks sharing a files structure, this test
* will limit the total number of files that can be opened.
*/
rcu_read_lock();
if (tsk->signal)
rlim_cur = 0;
if (lock_task_sighand(tsk, &irqs)) {
rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur;
else
rlim_cur = 0;
rcu_read_unlock();
unlock_task_sighand(tsk, &irqs);
}
if (fd >= rlim_cur)
goto out;

Expand Down

0 comments on commit b1ed8a1

Please sign in to comment.