
From: Zou Nan hai <nanhai.zou@intel.com>

The new sort routine only works if there are an even number of entries in
the ia64 exception fix-up tables.  If the number of entries is odd the sort
fails, and then random get_user/put_user calls can fail.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/lib/sort.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN lib/sort.c~sort-fix lib/sort.c
--- 25/lib/sort.c~sort-fix	Mon Feb  7 14:40:15 2005
+++ 25-akpm/lib/sort.c	Mon Feb  7 14:40:15 2005
@@ -47,7 +47,7 @@ void sort(void *base, size_t num, size_t
 	  void (*swap)(void *, void *, int size))
 {
 	/* pre-scale counters for performance */
-	int i = (num/2 - 1) * size, n = num * size, c, r;
+	int i = (num/2) * size, n = num * size, c, r;
 
 	if (!swap)
 		swap = (size == 4 ? u32_swap : generic_swap);
_
