OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be1ffce
)
sparc64: Fix offset calculation in compute_size()
author
David S. Miller
<davem@davemloft.net>
Mon, 1 Dec 2008 10:48:26 +0000
(
02:48
-0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 1 Dec 2008 10:48:26 +0000
(
02:48
-0800)
The fault address is somewhere inside of the buffer, not
before it.
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/lib/user_fixup.c
patch
|
blob
|
history
diff --git
a/arch/sparc64/lib/user_fixup.c
b/arch/sparc64/lib/user_fixup.c
index
19d1fdb
..
05a361b
100644
(file)
--- 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;