Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tiwei Bie and committed by
Richard Weinberger
59376fb2 94090f41

+11 -14
+1 -4
arch/um/include/shared/skas/mm_id.h
··· 7 7 #define __MM_ID_H 8 8 9 9 struct mm_id { 10 - union { 11 - int mm_fd; 12 - int pid; 13 - } u; 10 + int pid; 14 11 unsigned long stack; 15 12 int syscall_data_len; 16 13 };
+1 -1
arch/um/kernel/reboot.c
··· 29 29 t = find_lock_task_mm(p); 30 30 if (!t) 31 31 continue; 32 - pid = t->mm->context.id.u.pid; 32 + pid = t->mm->context.id.pid; 33 33 task_unlock(t); 34 34 os_kill_ptraced_process(pid, 1); 35 35 }
+6 -6
arch/um/kernel/skas/mmu.c
··· 32 32 new_id->stack = stack; 33 33 34 34 block_signals_trace(); 35 - new_id->u.pid = start_userspace(stack); 35 + new_id->pid = start_userspace(stack); 36 36 unblock_signals_trace(); 37 37 38 - if (new_id->u.pid < 0) { 39 - ret = new_id->u.pid; 38 + if (new_id->pid < 0) { 39 + ret = new_id->pid; 40 40 goto out_free; 41 41 } 42 42 ··· 83 83 * whole UML suddenly dying. Also, cover negative and 84 84 * 1 cases, since they shouldn't happen either. 85 85 */ 86 - if (mmu->id.u.pid < 2) { 86 + if (mmu->id.pid < 2) { 87 87 printk(KERN_ERR "corrupt mm_context - pid = %d\n", 88 - mmu->id.u.pid); 88 + mmu->id.pid); 89 89 return; 90 90 } 91 - os_kill_ptraced_process(mmu->id.u.pid, 1); 91 + os_kill_ptraced_process(mmu->id.pid, 1); 92 92 93 93 free_pages(mmu->id.stack, ilog2(STUB_DATA_PAGES)); 94 94 }
+1 -1
arch/um/kernel/time.c
··· 839 839 if (get_current()->mm != NULL) 840 840 { 841 841 /* userspace - relay signal, results in correct userspace timers */ 842 - os_alarm_process(get_current()->mm->context.id.u.pid); 842 + os_alarm_process(get_current()->mm->context.id.pid); 843 843 } 844 844 845 845 (*timer_clockevent.event_handler)(&timer_clockevent);
+1 -1
arch/um/os-Linux/skas/mem.c
··· 78 78 { 79 79 struct stub_data *proc_data = (void *)mm_idp->stack; 80 80 int n, i; 81 - int err, pid = mm_idp->u.pid; 81 + int err, pid = mm_idp->pid; 82 82 83 83 n = ptrace_setregs(pid, syscall_regs); 84 84 if (n < 0) {
+1 -1
arch/um/os-Linux/skas/process.c
··· 588 588 589 589 void __switch_mm(struct mm_id *mm_idp) 590 590 { 591 - userspace_pid[0] = mm_idp->u.pid; 591 + userspace_pid[0] = mm_idp->pid; 592 592 }