Fix pmap_extract so that it doesn't panic if the user types
'cat /proc/pid/map' Submitted by: Arun Sharma <arun.sharma@intel.com>
This commit is contained in:
parent
628edf0f9b
commit
388dc84194
@ -1172,13 +1172,20 @@ pmap_extract(pmap, va)
|
||||
register pmap_t pmap;
|
||||
vm_offset_t va;
|
||||
{
|
||||
struct ia64_lpte *pte;
|
||||
pmap_t oldpmap;
|
||||
vm_offset_t pa;
|
||||
|
||||
if (!pmap)
|
||||
return 0;
|
||||
|
||||
oldpmap = pmap_install(pmap);
|
||||
pa = ia64_tpa(va);
|
||||
pte = pmap_find_vhpt(va);
|
||||
pmap_install(oldpmap);
|
||||
return pa;
|
||||
|
||||
if (!pte)
|
||||
return 0;
|
||||
|
||||
return pmap_pte_pa(pte);
|
||||
}
|
||||
|
||||
/***************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user