mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-25 05:00:39 +00:00
Fix up lost patch in compat_sys_select() for new RCU files world order
Andrew lost this in patch reject resolution, and never noticed, since the compat code isn't in use on x86. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
1d8674edb5
commit
a4531edd75
@ -1619,6 +1619,7 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
|
||||
char *bits;
|
||||
long timeout;
|
||||
int size, max_fdset, ret = -EINVAL;
|
||||
struct fdtable *fdt;
|
||||
|
||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
if (tvp) {
|
||||
@ -1644,7 +1645,8 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
|
||||
goto out_nofds;
|
||||
|
||||
/* max_fdset can increase, so grab it once to avoid race */
|
||||
max_fdset = current->files->max_fdset;
|
||||
fdt = files_fdtable(current->files);
|
||||
max_fdset = fdt->max_fdset;
|
||||
if (n > max_fdset)
|
||||
n = max_fdset;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user