From bb736eb9f72fd274f569d11e76415385050c9247 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 31 Mar 2006 11:18:57 -0500 Subject: [PATCH] --- yaml --- r: 24955 b: refs/heads/master c: 30c14e40ed85469f166b5effdab6705c73c5cd5e h: refs/heads/master i: 24953: 6ab8ba091ffe10b0f9f75407f4e46d3f0d6e91aa 24951: 7c07c0df47386f27ade60cc92fbca7c3f2bbac9e v: v3 --- [refs] | 2 +- trunk/fs/select.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 890df120e36c..8d8bf3234012 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d21c356b08820e60501ce7a42107a7f05863d91d +refs/heads/master: 30c14e40ed85469f166b5effdab6705c73c5cd5e diff --git a/trunk/fs/select.c b/trunk/fs/select.c index b3a3a1326af6..071660fa7b01 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -314,7 +314,7 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, int ret, size, max_fdset; struct fdtable *fdt; /* Allocate small arguments on the stack to save memory and be faster */ - char stack_fds[SELECT_STACK_ALLOC]; + long stack_fds[SELECT_STACK_ALLOC/sizeof(long)]; ret = -EINVAL; if (n < 0) @@ -639,8 +639,10 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, s64 *timeout) struct poll_list *walk; struct fdtable *fdt; int max_fdset; - /* Allocate small arguments on the stack to save memory and be faster */ - char stack_pps[POLL_STACK_ALLOC]; + /* Allocate small arguments on the stack to save memory and be + faster - use long to make sure the buffer is aligned properly + on 64 bit archs to avoid unaligned access */ + long stack_pps[POLL_STACK_ALLOC/sizeof(long)]; struct poll_list *stack_pp = NULL; /* Do a sanity check on nfds ... */