提交 b270ee8a 编写于 作者: D David S. Miller

sparc64: Fix offset calculation in compute_size()

The fault address is somewhere inside of the buffer, not
before it.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 be1ffce3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册