/* this routine will put a word on the processes privileged stack. the offset is how far from the base addr as stored in the THREAD. this routine assumes that all the privileged stacks are in our data space.  */
static int put_user_reg(struct task_struct *task, int offset, long data)
/* this routine will put a word on the processes privileged stack. the offset is how far from the base addr as stored in the THREAD. this routine assumes that all the privileged stacks are in our data space.  */
static int put_user_reg(struct task_struct *task, int offset, long data)
{
	struct pt_regs newregs, *regs = task_pt_regs(task);
	int ret = -EINVAL;
	newregs = *regs;
	newregs.uregs[offset] = data;
	if (valid_user_regs(&newregs)) {
		regs->uregs[offset] = data;
		ret = 0;
	}
	return ret;
}