Add a flag to grants system indicating a slot is VALID; so a slot
can be reserved (USED), while toggling VALID on and off.
This commit is contained in:
@@ -90,8 +90,8 @@ endpoint_t *e_granter; /* new granter (magic grants) */
|
||||
phys_copy(phys_grant, vir2phys(&g), sizeof(g));
|
||||
|
||||
/* Check validity. */
|
||||
if(!(g.cp_flags & CPF_USED)) {
|
||||
kprintf("grant verify failed: invalid\n");
|
||||
if((g.cp_flags & (CPF_USED | CPF_VALID)) != (CPF_USED | CPF_VALID)) {
|
||||
kprintf("grant verify failed: unused or invalid\n");
|
||||
return EPERM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user