Added userptr access check to exchange_registers

This commit is contained in:
Bahadir Balban
2009-10-18 15:05:56 +03:00
parent 2bd3266498
commit 72af4a843a

View File

@@ -126,6 +126,11 @@ int sys_exchange_registers(struct exregs_data *exregs, l4id_t tid)
int err = 0;
struct ktcb *task;
if ((err = check_access((unsigned long)exregs,
sizeof(*exregs),
MAP_USR_RW_FLAGS, 1)) < 0)
return err;
/* Find tcb from its list */
if (!(task = tcb_find(tid)))
return -ESRCH;