From: David S. Miller Date: Mon, 1 Dec 2008 10:48:26 +0000 (-0800) Subject: sparc64: Fix offset calculation in compute_size() X-Git-Tag: v2.6.28-rc8~72^2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b270ee8a9fc9547eb781ce9ccd379450bcf9a204;p=linux-2.6-omap-h63xx.git sparc64: Fix offset calculation in compute_size() The fault address is somewhere inside of the buffer, not before it. Signed-off-by: David S. Miller --- diff --git a/arch/sparc64/lib/user_fixup.c b/arch/sparc64/lib/user_fixup.c index 19d1fdb17d0..05a361b0a1a 100644 --- a/arch/sparc64/lib/user_fixup.c +++ b/arch/sparc64/lib/user_fixup.c @@ -24,7 +24,7 @@ static unsigned long compute_size(unsigned long start, unsigned long size, unsig if (fault_addr < start || fault_addr >= end) { *offset = 0; } else { - *offset = start - fault_addr; + *offset = fault_addr - start; size = end - fault_addr; } return size;