Return EFAULT when the address is not a kernel virtual address.
This commit is contained in:
parent
7a4accc1f0
commit
cb35030ab3
@ -128,6 +128,8 @@ kmemphys:
|
|||||||
*/
|
*/
|
||||||
addr = trunc_page(v);
|
addr = trunc_page(v);
|
||||||
eaddr = round_page(v + c);
|
eaddr = round_page(v + c);
|
||||||
|
if (addr < VM_MAXUSER_ADDRESS)
|
||||||
|
return (EFAULT);
|
||||||
for (; addr < eaddr; addr += PAGE_SIZE) {
|
for (; addr < eaddr; addr += PAGE_SIZE) {
|
||||||
if (pmap_kextract(addr) == 0)
|
if (pmap_kextract(addr) == 0)
|
||||||
return (EFAULT);
|
return (EFAULT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user