Skip to content

Commit

Permalink
sparc64: Fix offset calculation in compute_size()
Browse files Browse the repository at this point in the history
The fault address is somewhere inside of the buffer, not
before it.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 1, 2008
1 parent be1ffce commit b270ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sparc64/lib/user_fixup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b270ee8

Please sign in to comment.