diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-25 18:57:27 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-25 18:57:27 -0800 |
| commit | ac517c3f41ac2c4dd456e93365eae83d520eec61 (patch) | |
| tree | 590f1eb93ecc4a1f928d4abc0ffcce81e2838f6a | |
| parent | 56eb992ec0a05e0b66e4f0a967adb250e23c5df2 (diff) | |
The fast poll code incorrectly assumed that "sizeof pp" was the same
as "offsetof pp->entries". Which happens to be true on 32-bit platforms,
but not on 64-bit ones.
From Anton Blanchard.
| -rw-r--r-- | fs/select.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/select.c b/fs/select.c index 456465510c09..510e1defe964 100644 --- a/fs/select.c +++ b/fs/select.c @@ -471,7 +471,7 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout) walk->next = pp; walk = pp; - if (copy_from_user(pp+1, ufds + nfds-i, + if (copy_from_user(pp->entries, ufds + nfds-i, sizeof(struct pollfd)*pp->len)) { err = -EFAULT; goto out_fds; |
