mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 17:26:38 +07:00
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 <davem@davemloft.net>
This commit is contained in:
parent
be1ffce352
commit
b270ee8a9f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user