um: Remove unused mm_fd field from mm_id
It's no longer used since the removal of the SKAS3/4 support. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
94090f418f
commit
59376fb2a7
@ -7,10 +7,7 @@
|
|||||||
#define __MM_ID_H
|
#define __MM_ID_H
|
||||||
|
|
||||||
struct mm_id {
|
struct mm_id {
|
||||||
union {
|
int pid;
|
||||||
int mm_fd;
|
|
||||||
int pid;
|
|
||||||
} u;
|
|
||||||
unsigned long stack;
|
unsigned long stack;
|
||||||
int syscall_data_len;
|
int syscall_data_len;
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ static void kill_off_processes(void)
|
|||||||
t = find_lock_task_mm(p);
|
t = find_lock_task_mm(p);
|
||||||
if (!t)
|
if (!t)
|
||||||
continue;
|
continue;
|
||||||
pid = t->mm->context.id.u.pid;
|
pid = t->mm->context.id.pid;
|
||||||
task_unlock(t);
|
task_unlock(t);
|
||||||
os_kill_ptraced_process(pid, 1);
|
os_kill_ptraced_process(pid, 1);
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,11 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
|
|||||||
new_id->stack = stack;
|
new_id->stack = stack;
|
||||||
|
|
||||||
block_signals_trace();
|
block_signals_trace();
|
||||||
new_id->u.pid = start_userspace(stack);
|
new_id->pid = start_userspace(stack);
|
||||||
unblock_signals_trace();
|
unblock_signals_trace();
|
||||||
|
|
||||||
if (new_id->u.pid < 0) {
|
if (new_id->pid < 0) {
|
||||||
ret = new_id->u.pid;
|
ret = new_id->pid;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,12 +83,12 @@ void destroy_context(struct mm_struct *mm)
|
|||||||
* whole UML suddenly dying. Also, cover negative and
|
* whole UML suddenly dying. Also, cover negative and
|
||||||
* 1 cases, since they shouldn't happen either.
|
* 1 cases, since they shouldn't happen either.
|
||||||
*/
|
*/
|
||||||
if (mmu->id.u.pid < 2) {
|
if (mmu->id.pid < 2) {
|
||||||
printk(KERN_ERR "corrupt mm_context - pid = %d\n",
|
printk(KERN_ERR "corrupt mm_context - pid = %d\n",
|
||||||
mmu->id.u.pid);
|
mmu->id.pid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
os_kill_ptraced_process(mmu->id.u.pid, 1);
|
os_kill_ptraced_process(mmu->id.pid, 1);
|
||||||
|
|
||||||
free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES));
|
free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES));
|
||||||
}
|
}
|
||||||
|
@ -839,7 +839,7 @@ static irqreturn_t um_timer(int irq, void *dev)
|
|||||||
if (get_current()->mm != NULL)
|
if (get_current()->mm != NULL)
|
||||||
{
|
{
|
||||||
/* userspace - relay signal, results in correct userspace timers */
|
/* userspace - relay signal, results in correct userspace timers */
|
||||||
os_alarm_process(get_current()->mm->context.id.u.pid);
|
os_alarm_process(get_current()->mm->context.id.pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
(*timer_clockevent.event_handler)(&timer_clockevent);
|
(*timer_clockevent.event_handler)(&timer_clockevent);
|
||||||
|
@ -78,7 +78,7 @@ static inline long do_syscall_stub(struct mm_id *mm_idp)
|
|||||||
{
|
{
|
||||||
struct stub_data *proc_data = (void *)mm_idp->stack;
|
struct stub_data *proc_data = (void *)mm_idp->stack;
|
||||||
int n, i;
|
int n, i;
|
||||||
int err, pid = mm_idp->u.pid;
|
int err, pid = mm_idp->pid;
|
||||||
|
|
||||||
n = ptrace_setregs(pid, syscall_regs);
|
n = ptrace_setregs(pid, syscall_regs);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
|
@ -588,5 +588,5 @@ void reboot_skas(void)
|
|||||||
|
|
||||||
void __switch_mm(struct mm_id *mm_idp)
|
void __switch_mm(struct mm_id *mm_idp)
|
||||||
{
|
{
|
||||||
userspace_pid[0] = mm_idp->u.pid;
|
userspace_pid[0] = mm_idp->pid;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user