X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fselect.c;h=071660fa7b01e06d9717f6ac14ce2410414dbf91;hb=b09e593d799560f1a0782c20ac5900058390a26f;hp=b3a3a1326af66e63505860cef77c8ae343ebc55a;hpb=86579dd06deecfa6ac88d5e84e4d63c397cd6f6d;p=linux-2.6-omap-h63xx.git diff --git a/fs/select.c b/fs/select.c index b3a3a1326af..071660fa7b0 100644 --- a/fs/select.c +++ b/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 ... */