|
>The "flag set, pointer non-NULL" case wouldn't hit the "return 0" path
Correct.
But what about the "flag not set" case. When PTE_UPDATE_SWAP is not set then
UPDATE_ENTRY may return 0.
If UPDATE_ENTRY() returns 0 then mod_l1_entry() will give
the wrong ol1e value to put_page_from_l1e().
static int mod_l1_entry( ... )
{
...
ol1e = UPDATE_ENTRY(l1, pl1e, ol1e, ...);
...
put_page_from_l1e(ol1e, pt_dom);
...
}
I think mod_l1_entry may need to store a copy of ol1e incase UPDATE_ENTRY()
returns 0. Or add some extra if/else around every call to UPDATE_ENTRY() to
only assign ol1e if we know we're on the new PTE_UPDATE_SWAP path.
And the mod_l{2,3,4}_entry() functions will probably have to do the same thing
too so I just wanted to get some input first.
|