diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-01 02:48:26 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-12-13 15:29:12 -0800 |
commit | 6a42ebd5cf9a62212017fe944d0eea2a9af29981 (patch) | |
tree | a9a29dcb21f2eb4bc84b9b518e8b7c6e367b8d5a /arch | |
parent | 6e7f7429b1f5a151943d920e52fdd59b5e7d13ba (diff) |
sparc64: Fix offset calculation in compute_size()
[ Upstream commit b270ee8a9fc9547eb781ce9ccd379450bcf9a204 ]
The fault address is somewhere inside of the buffer, not
before it.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/lib/user_fixup.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |