提交 a4531edd 编写于 作者: L Linus Torvalds

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: NLinus Torvalds <torvalds@osdl.org>
上级 1d8674ed
...@@ -1619,6 +1619,7 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp ...@@ -1619,6 +1619,7 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
char *bits; char *bits;
long timeout; long timeout;
int size, max_fdset, ret = -EINVAL; int size, max_fdset, ret = -EINVAL;
struct fdtable *fdt;
timeout = MAX_SCHEDULE_TIMEOUT; timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) { if (tvp) {
...@@ -1644,7 +1645,8 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp ...@@ -1644,7 +1645,8 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
goto out_nofds; goto out_nofds;
/* max_fdset can increase, so grab it once to avoid race */ /* 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) if (n > max_fdset)
n = max_fdset; n = max_fdset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册