Use helpers to obtain task pid in printks (arch code)
Subsystems (15)
PATCH 107/144 Use helpers to obtain task pid in printks (arch code)
From: Alexey Dobriyan <[email protected]>
One of the easiest things to isolate is the pid printed in kernel log. There was a patch, that made this for arch-independent code, this one makes so for arch/xxx files.
It took some time to cross-compile it, but hopefully these are all the printks in arch code.
Signed-off-by Alexey Dobriyan <[email protected]>
Signed-off-by Pavel Emelyanov <[email protected]>
Cc <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/alpha/kernel/semaphore.c | 16 +- arch/alpha/kernel/traps.c | 6 arch/alpha/mm/fault.c | 2 arch/arm/kernel/process.c | 2 arch/arm/kernel/ptrace.c | 8 - arch/arm/kernel/traps.c | 10 - arch/arm/mm/alignment.c | 2 arch/ia64/ia32/sys_ia32.c | 6 arch/ia64/kernel/perfmon.c | 161 +++++++++++----------- arch/ia64/kernel/perfmon_default_smpl.c | 8 - arch/ia64/kernel/process.c | 3 arch/ia64/kernel/traps.c | 6 arch/ia64/kernel/unaligned.c | 5 arch/m32r/kernel/traps.c | 2 arch/m68k/kernel/traps.c | 4 arch/mips/kernel/traps.c | 2 arch/parisc/kernel/traps.c | 10 - arch/parisc/kernel/unaligned.c | 2 arch/parisc/mm/fault.c | 2 arch/powerpc/kernel/process.c | 2 arch/powerpc/kernel/traps.c | 2 arch/s390/kernel/process.c | 2 arch/sh/kernel/process.c | 2 arch/sh/kernel/signal.c | 4 arch/sh/kernel/traps.c | 7 arch/sh64/kernel/traps.c | 4 arch/sh64/mm/fault.c | 4 arch/sparc/kernel/ptrace.c | 4 arch/sparc/kernel/sys_sparc.c | 2 arch/sparc/kernel/traps.c | 4 arch/sparc64/kernel/traps.c | 2 arch/um/sys-x86_64/sysrq.c | 4 arch/x86/kernel/process_32.c | 2 arch/x86/kernel/signal_32.c | 4 arch/x86/kernel/traps_32.c | 4 arch/x86/mm/fault_32.c | 4 arch/xtensa/kernel/traps.c | 6 37 files changed, 163 insertions(+), 157 deletions(-)
arch/alpha/kernel/semaphore.c renamed from arch/alpha/kernel/semaphore.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +8 -8
@@ -69,7 +69,7 @@ __down_failed(struct semaphore *sem)#ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down failed(%p)\n" , - tsk->comm, tsk->pid, sem); + tsk->comm,task_pid_nr (tsk), sem);#endif tsk->state =TASK_UNINTERRUPTIBLE ;
@@ -98,7 +98,7 @@ __down_failed(struct semaphore *sem)#ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down acquired(%p)\n" , - tsk->comm, tsk->pid, sem); + tsk->comm,task_pid_nr (tsk), sem);#endif }
@@ -111,7 +111,7 @@ __down_failed_interruptible(struct semap#ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down failed(%p)\n" , - tsk->comm, tsk->pid, sem); + tsk->comm,task_pid_nr (tsk), sem);#endif tsk->state =TASK_INTERRUPTIBLE ;
@@ -139,7 +139,7 @@ __down_failed_interruptible(struct semap#ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down %s(%p)\n" , - current->comm, current->pid, + current->comm,task_pid_nr (current), (ret <0 ?"interrupted" :"acquired" ), sem);#endif return ret;
@@ -168,7 +168,7 @@ down(struct semaphore *sem)#endif #ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down(%p) <count=%d> from %p\n" , - current->comm, current->pid, sem, + current->comm,task_pid_nr (current), sem,atomic_read (&sem->count),__builtin_return_address (0 ));#endif __down (sem);
@@ -182,7 +182,7 @@ down_interruptible(struct semaphore *sem#endif #ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down(%p) <count=%d> from %p\n" , - current->comm, current->pid, sem, + current->comm,task_pid_nr (current), sem,atomic_read (&sem->count),__builtin_return_address (0 ));#endif return __down_interruptible (sem);
@@ -201,7 +201,7 @@ down_trylock(struct semaphore *sem)#ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): down_trylock %s from %p\n" , - current->comm, current->pid, + current->comm,task_pid_nr (current), ret ?"failed" :"acquired" ,__builtin_return_address (0 ));#endif
@@ -217,7 +217,7 @@ up(struct semaphore *sem)#endif #ifdef CONFIG_DEBUG_SEMAPHORE printk ("%s(%d): up(%p) <count=%d> from %p\n" , - current->comm, current->pid, sem, + current->comm,task_pid_nr (current), sem,atomic_read (&sem->count),__builtin_return_address (0 ));#endif __up (sem);
arch/alpha/kernel/traps.c renamed from arch/alpha/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +3 -3
@@ -182,7 +182,7 @@ die_if_kernel(char * str, struct pt_regs#ifdef CONFIG_SMP printk ("CPU %d " ,hard_smp_processor_id ());#endif -printk ("%s(%d): %s %ld\n" , current->comm, current->pid, str, err); +printk ("%s(%d): %s %ld\n" , current->comm,task_pid_nr (current), str, err);dik_show_regs (regs, r9_15);add_taint (TAINT_DIE );dik_show_trace ((unsigned long *)(regs+1 ));
@@ -646,7 +646,7 @@ got_exception:lock_kernel ();printk ("%s(%d): unhandled unaligned exception\n" , - current->comm, current->pid); + current->comm,task_pid_nr (current));printk ("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n" , pc,una_reg (26 ), regs->ps);
@@ -786,7 +786,7 @@ do_entUnaUser(void __user * va, unsigned }if (++cnt <5 ) {printk ("%s(%d): unaligned trap at %016lx: %p %lx %ld\n" , - current->comm, current->pid, + current->comm,task_pid_nr (current), regs->pc -4 , va, opcode, reg); } last_time = jiffies;
arch/alpha/mm/fault.c renamed from arch/alpha/mm/fault.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -194,7 +194,7 @@ do_page_fault(unsigned long address, uns goto survive; }printk (KERN_ALERT "VM: killing process %s(%d)\n" , - current->comm, current->pid); + current->comm,task_pid_nr (current));if (!user_mode (regs)) goto no_context;do_group_exit (SIGKILL );
arch/arm/kernel/process.c renamed from arch/arm/kernel/process.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -265,7 +265,7 @@ void __show_regs(struct pt_regs *regs)void show_regs (struct pt_regs * regs) {printk ("\n" ); -printk ("Pid: %d, comm: %20s\n" , current->pid, current->comm); +printk ("Pid: %d, comm: %20s\n" ,task_pid_nr (current), current->comm);__show_regs (regs);__backtrace (); }
arch/arm/kernel/ptrace.c renamed from arch/arm/kernel/ptrace.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +4 -4
@@ -382,16 +382,16 @@ static void clear_breakpoint(struct taskif (ret !=2 || old_insn.thumb !=BREAKINST_THUMB )printk (KERN_ERR "%s:%d: corrupted Thumb breakpoint at " -"0x%08lx (0x%04x)\n" , task->comm, task->pid, - addr, old_insn.thumb); +"0x%08lx (0x%04x)\n" , task->comm, +task_pid_nr (task), addr, old_insn.thumb); }else { ret =swap_insn (task, addr & ~3 , &old_insn.arm, &bp->insn.arm,4 );if (ret !=4 || old_insn.arm !=BREAKINST_ARM )printk (KERN_ERR "%s:%d: corrupted ARM breakpoint at " -"0x%08lx (0x%08x)\n" , task->comm, task->pid, - addr, old_insn.arm); +"0x%08lx (0x%08x)\n" , task->comm, +task_pid_nr (task), addr, old_insn.arm); } }
arch/arm/kernel/traps.c renamed from arch/arm/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +5 -5
@@ -223,7 +223,7 @@ static void __die(const char *str, int eprint_modules ();__show_regs (regs);printk ("Process %s (pid: %d, stack limit = 0x%p)\n" , - tsk->comm, tsk->pid, thread +1 ); + tsk->comm,task_pid_nr (tsk), thread +1 );if (!user_mode (regs) ||in_interrupt ()) { dump_mem("Stack: ", regs->ARM_sp,
@@ -337,7 +337,7 @@ asmlinkage void __exception do_undefinst#ifdef CONFIG_DEBUG_USER if (user_debug &UDBG_UNDEFINED ) {printk (KERN_INFO "%s (%d): undefined instruction: pc=%p\n" , - current->comm, current->pid, pc); + current->comm,task_pid_nr (current), pc);dump_instr (regs); }#endif
@@ -388,7 +388,7 @@ static int bad_syscall(int n, struct pt_#ifdef CONFIG_DEBUG_USER if (user_debug &UDBG_SYSCALL ) {printk (KERN_ERR "[%d] %s: obsolete system call %08x.\n" , - current->pid, current->comm, n); +task_pid_nr (current), current->comm, n);dump_instr (regs); }#endif
@@ -565,7 +565,7 @@ asmlinkage int arm_syscall(int no, struc*/ if (user_debug &UDBG_SYSCALL ) {printk ("[%d] %s: arm syscall %d\n" , - current->pid, current->comm, no); +task_pid_nr (current), current->comm, no);dump_instr (regs);if (user_mode (regs)) {__show_regs (regs);
@@ -642,7 +642,7 @@ baddataabort(int code, unsigned long ins#ifdef CONFIG_DEBUG_USER if (user_debug &UDBG_BADABORT ) {printk (KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n" , - current->pid, current->comm, code, instr); +task_pid_nr (current), current->comm, code, instr);dump_instr (regs);show_pte (current->mm, addr); }
arch/arm/mm/alignment.c renamed from arch/arm/mm/alignment.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -757,7 +757,7 @@ do_alignment(unsigned long addr, unsigneif (ai_usermode &1 )printk ("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx " "Address=0x%08lx FSR 0x%03x\n" , current->comm, - current->pid, instrptr, +task_pid_nr (current), instrptr,thumb_mode (regs) ?4 :8 ,thumb_mode (regs) ? tinstr : instr, addr, fsr);
arch/ia64/ia32/sys_ia32.c renamed from arch/ia64/ia32/sys_ia32.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +3 -3
@@ -773,7 +773,7 @@ emulate_mmap (struct file *file, unsigneif (flags &MAP_SHARED )printk (KERN_INFO "%s(%d): emulate_mmap() can't share head (addr=0x%lx)\n" , - current->comm, current->pid, start); + current->comm,task_pid_nr (current), start); ret =mmap_subpage (file, start,min (PAGE_ALIGN (start), end), prot, flags, off);if (IS_ERR ((void *) ret))
@@ -786,7 +786,7 @@ emulate_mmap (struct file *file, unsigneif (flags &MAP_SHARED )printk (KERN_INFO "%s(%d): emulate_mmap() can't share tail (end=0x%lx)\n" , - current->comm, current->pid, end); + current->comm,task_pid_nr (current), end); ret =mmap_subpage (file,max (start,PAGE_START (end)), end, prot, flags, (off + len) -offset_in_page (end));if (IS_ERR ((void *) ret))
@@ -816,7 +816,7 @@ emulate_mmap (struct file *file, unsigneif ((flags &MAP_SHARED ) && !is_congruent)printk (KERN_INFO "%s(%d): emulate_mmap() can't share contents of incongruent mmap " -"(addr=0x%lx,off=0x%llx)\n" , current->comm, current->pid, start, off); +"(addr=0x%lx,off=0x%llx)\n" , current->comm,task_pid_nr (current), start, off);DBG ("mmap_body: mapping [0x%lx-0x%lx) %s with poff 0x%llx\n" , pstart, pend, is_congruent ?"congruent" :"not congruent" , poff);
arch/ia64/kernel/perfmon.c renamed from arch/ia64/kernel/perfmon.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +82 -79
596 lines not on this page · raw message
arch/ia64/kernel/perfmon_default_smpl.c renamed from arch/ia64/kernel/perfmon_default_smpl.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +4 -4
@@ -44,11 +44,11 @@ default_validate(struct task_struct *tasint ret =0 ;if (data ==NULL ) { -DPRINT (("[%d] no argument passed\n" , task->pid)); +DPRINT (("[%d] no argument passed\n" ,task_pid_nr (task)));return -EINVAL ; } -DPRINT (("[%d] validate flags=0x%x CPU%d\n" , task->pid, flags, cpu)); +DPRINT (("[%d] validate flags=0x%x CPU%d\n" ,task_pid_nr (task), flags, cpu));/* * must hold at least the buffer header + one minimally sized entry
@@ -88,7 +88,7 @@ default_init(struct task_struct *task, v hdr->hdr_count =0UL ; DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u cur_offs=%lu\n", - task->pid, + task_pid_nr(task), buf, hdr->hdr_buf_size, sizeof(*hdr),
@@ -245,7 +245,7 @@ default_restart(struct task_struct *taskstatic int default_exit (struct task_struct *task,void *buf,struct pt_regs *regs) { -DPRINT (("[%d] exit(%p)\n" , task->pid, buf)); +DPRINT (("[%d] exit(%p)\n" ,task_pid_nr (task), buf));return 0 ; }
arch/ia64/kernel/process.c renamed from arch/ia64/kernel/process.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -1
@@ -105,7 +105,8 @@ show_regs (struct pt_regs *regs)unsigned long ip = regs->cr_iip +ia64_psr (regs)->ri;print_modules (); -printk ("\nPid: %d, CPU %d, comm: %20s\n" , current->pid,smp_processor_id (), current->comm); +printk ("\nPid: %d, CPU %d, comm: %20s\n" ,task_pid_nr (current), +smp_processor_id (), current->comm);printk ("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n" , regs->cr_ipsr, regs->cr_ifs, ip,print_tainted ());print_symbol ("ip is at %s\n" , ip);
arch/ia64/kernel/traps.c renamed from arch/ia64/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +3 -3
@@ -61,7 +61,7 @@ die (const char *str, struct pt_regs *reif (++die.lock_owner_depth <3 ) {printk ("%s[%d]: %s %ld [%d]\n" , - current->comm, current->pid, str, err, ++die_counter); + current->comm,task_pid_nr (current), str, err, ++die_counter); (void )notify_die (DIE_OOPS , (char *)str, regs, err,255 ,SIGSEGV );show_regs (regs); }else
@@ -315,7 +315,7 @@ handle_fpu_swa (int fp_fault, struct pt_ last.time = current_jiffies +5 *HZ ;printk (KERN_WARNING "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n" , - current->comm, current->pid, regs->cr_iip +ia64_psr (regs)->ri, isr); + current->comm,task_pid_nr (current), regs->cr_iip +ia64_psr (regs)->ri, isr); } } }
@@ -453,7 +453,7 @@ ia64_fault (unsigned long vector, unsignif (code ==8 ) {# ifdef CONFIG_IA64_PRINT_HAZARDS printk ("%s[%d]: possible hazard @ ip=%016lx (pr = %016lx)\n" , - current->comm, current->pid, + current->comm,task_pid_nr (current), regs.cr_iip +ia64_psr (®s)->ri, regs.pr);# endif return ;
arch/ia64/kernel/unaligned.c renamed from arch/ia64/kernel/unaligned.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +3 -2
@@ -1340,7 +1340,8 @@ ia64_handle_unaligned (unsigned long ifasize_t len; len =sprintf (buf,"%s(%d): unaligned access to 0x%016lx, " -"ip=0x%016lx\n\r" , current->comm, current->pid, +"ip=0x%016lx\n\r" , current->comm, +task_pid_nr (current), ifa, regs->cr_iip + ipsr->ri);/* * Don't call tty_write_message() if we're in the kernel; we might
@@ -1363,7 +1364,7 @@ ia64_handle_unaligned (unsigned long ifa"administrator\n" "echo 0 > /proc/sys/kernel/ignore-" "unaligned-usertrap to re-enable\n" , - current->comm, current->pid); + current->comm, task_pid_nr(current)); } } }else {
arch/m32r/kernel/traps.c renamed from arch/m32r/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -196,7 +196,7 @@ static void show_registers(struct pt_regprintk ("SPI: %08lx\n" , sp); }printk ("Process %s (pid: %d, process nr: %d, stackpage=%08lx)" , - current->comm, current->pid,0xffff & i,4096 +(unsigned long )current); + current->comm,task_pid_nr (current),0xffff & i,4096 +(unsigned long )current);/* * When in-kernel, we also print out the stack and code at the
arch/m68k/kernel/traps.c renamed from arch/m68k/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -900,7 +900,7 @@ void show_registers(struct pt_regs *regs regs->d4, regs->d5, regs->a0, regs->a1);printk ("Process %s (pid: %d, task=%p)\n" , - current->comm, current->pid, current); + current->comm,task_pid_nr (current), current); addr = (unsigned long )&fp->un;printk ("Frame format=%X " , regs->format);switch (regs->format) {
@@ -1038,7 +1038,7 @@ void bad_super_trap (struct frame *fp) fp->un.fmtb.daddr, space_names[ssw &DFC ], fp->ptregs.pc); } -printk ("Current process id is %d\n" , current->pid); +printk ("Current process id is %d\n" ,task_pid_nr (current));die_if_kernel ("BAD KERNEL TRAP" , &fp->ptregs,0 ); }
arch/mips/kernel/traps.c renamed from arch/mips/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -314,7 +314,7 @@ void show_registers(const struct pt_regs__show_regs (regs);print_modules ();printk ("Process %s (pid: %d, threadinfo=%p, task=%p)\n" , - current->comm, current->pid,current_thread_info (), current); + current->comm,task_pid_nr (current),current_thread_info (), current);show_stacktrace (current, regs);show_code ((unsigned int __user *) regs->cp0_epc);printk ("\n" );
arch/parisc/kernel/traps.c renamed from arch/parisc/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +5 -5
@@ -219,7 +219,7 @@ void die_if_kernel(char *str, struct pt_return ;/* STFU */ printk (KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n" , - current->comm, current->pid, str, err, regs->iaoq[0 ]); + current->comm,task_pid_nr (current), str, err, regs->iaoq[0 ]);#ifdef PRINT_USER_FAULTS /* XXX for debugging only */ show_regs (regs);
@@ -252,7 +252,7 @@ KERN_CRIT " || |if (err)printk (KERN_CRIT "%s (pid %d): %s (code %ld)\n" , - current->comm, current->pid, str, err); + current->comm,task_pid_nr (current), str, err);/* Wot's wrong wif bein' racy? */ if (current->thread.flags &PARISC_KERNEL_DEATH ) {
@@ -317,7 +317,7 @@ static void handle_break(struct pt_regsif (unlikely (iir !=GDB_BREAK_INSN )) {printk (KERN_DEBUG "break %d,%d: pid=%d command='%s'\n" , iir &31 , (iir>>13 ) & ((1 <<13 )-1 ), - current->pid, current->comm); +task_pid_nr (current), current->comm);show_regs (regs); }#endif
@@ -747,7 +747,7 @@ void handle_interruption(int code, strucif (user_mode (regs)) {#ifdef PRINT_USER_FAULTS printk (KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n" , - current->pid, current->comm); +task_pid_nr (current), current->comm);show_regs (regs);#endif /* SIGBUS, for lack of a better one. */
@@ -772,7 +772,7 @@ void handle_interruption(int code, struc else printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", code); -printk ("pid=%d command='%s'\n" , current->pid, current->comm); +printk ("pid=%d command='%s'\n" ,task_pid_nr (current), current->comm);show_regs (regs);#endif si.si_signo =SIGSEGV ;
arch/parisc/kernel/unaligned.c renamed from arch/parisc/kernel/unaligned.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -469,7 +469,7 @@ void handle_unaligned(struct pt_regs *re && ++unaligned_count < 5) {char buf[256 ];sprintf (buf,"%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n" , - current->comm, current->pid, regs->ior, regs->iaoq[0 ]); + current->comm,task_pid_nr (current), regs->ior, regs->iaoq[0 ]);printk (KERN_WARNING "%s" , buf);#ifdef DEBUG_UNALIGNED show_regs (regs);
arch/parisc/mm/fault.c renamed from arch/parisc/mm/fault.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -211,7 +211,7 @@ bad_area:#ifdef PRINT_USER_FAULTS printk (KERN_DEBUG "\n" );printk (KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n" , - tsk->pid, tsk->comm, code, address); +task_pid_nr (tsk), tsk->comm, code, address);if (vma) {printk (KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n" , vma->vm_start, vma->vm_end);
arch/powerpc/kernel/process.c renamed from arch/powerpc/kernel/process.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -459,7 +459,7 @@ void show_regs(struct pt_regs * regs)printk ("DAR: " REG ", DSISR: " REG "\n" , regs->dar, regs->dsisr);#endif printk ("TASK = %p[%d] '%s' THREAD: %p" , - current, current->pid, current->comm,task_thread_info (current)); + current,task_pid_nr (current), current->comm,task_thread_info (current));#ifdef CONFIG_SMP printk (" CPU: %d" ,smp_processor_id ());
arch/powerpc/kernel/traps.c renamed from arch/powerpc/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -881,7 +881,7 @@ void nonrecoverable_exception(struct pt_void trace_syscall (struct pt_regs *regs) {printk ("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n" , - current, current->pid, regs->nip, regs->link, regs->gpr[0 ], + current,task_pid_nr (current), regs->nip, regs->link, regs->gpr[0 ], regs->ccr&0x10000000 ?"Error=" :"" , regs->gpr[3 ],print_tainted ()); }
arch/s390/kernel/process.c renamed from arch/s390/kernel/process.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -166,7 +166,7 @@ void show_regs(struct pt_regs *regs)printk ("CPU: %d %s\n" ,task_thread_info (tsk)->cpu,print_tainted ());printk ("Process %s (pid: %d, task: %p, ksp: %p)\n" , - current->comm, current->pid, (void *) tsk, + current->comm,task_pid_nr (current), (void *) tsk, (void *) tsk->thread.ksp);show_registers (regs);
arch/sh/kernel/process.c renamed from arch/sh/kernel/process.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -121,7 +121,7 @@ void machine_power_off(void)void show_regs (struct pt_regs * regs) {printk ("\n" ); -printk ("Pid : %d, Comm: %20s\n" , current->pid, current->comm); +printk ("Pid : %d, Comm: %20s\n" ,task_pid_nr (current), current->comm);print_symbol ("PC is at %s\n" ,instruction_pointer (regs));printk ("PC : %08lx SP : %08lx SR : %08lx " , regs->pc, regs->regs[15 ], regs->sr);
arch/sh/kernel/signal.c renamed from arch/sh/kernel/signal.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -382,7 +382,7 @@ static int setup_frame(int sig, struct kset_fs (USER_DS );pr_debug ("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n" , - current->comm, current->pid, frame, regs->pc, regs->pr); + current->comm,task_pid_nr (current), frame, regs->pc, regs->pr);flush_cache_sigtramp (regs->pr);
@@ -462,7 +462,7 @@ static int setup_rt_frame(int sig, strucset_fs (USER_DS );pr_debug ("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n" , - current->comm, current->pid, frame, regs->pc, regs->pr); + current->comm,task_pid_nr (current), frame, regs->pc, regs->pr);flush_cache_sigtramp (regs->pr);
arch/sh/kernel/traps.c renamed from arch/sh/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +4 -3
@@ -95,8 +95,8 @@ void die(const char * str, struct pt_regprint_modules ();show_regs (regs); -printk ("Process: %s (pid: %d, stack limit = %p)\n" , - current->comm, current->pid,task_stack_page (current) +1 ); +printk ("Process: %s (pid: %d, stack limit = %p)\n" , current->comm, +task_pid_nr (current),task_stack_page (current) +1 );if (!user_mode (regs) ||in_interrupt ()) dump_mem("Stack: ", regs->regs[15], THREAD_SIZE +
@@ -386,7 +386,8 @@ static int handle_unaligned_access(u16 iprintk (KERN_NOTICE "Fixing up unaligned userspace access " "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n" , - current->comm,current->pid,(u16 *)regs->pc,instruction); + current->comm,task_pid_nr (current), + (u16 *)regs->pc, instruction); } ret = -EFAULT ;
arch/sh64/kernel/traps.c renamed from arch/sh64/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -764,7 +764,7 @@ static int misaligned_fixup(struct pt_re --user_mode_unaligned_fixup_count;/* Only do 'count' worth of these reports, to remove a potential DoS against syslog */ printk ("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n" , - current->comm, current->pid, (__u32 )regs->pc, opcode); + current->comm,task_pid_nr (current), (__u32 )regs->pc, opcode); } else#endif if (!user_mode (regs) && (kernel_mode_unaligned_fixup_count >0 )) {
@@ -774,7 +774,7 @@ static int misaligned_fixup(struct pt_re (__u32)regs->pc, opcode); }else {printk ("Fixing up unaligned kernelspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n" , - current->comm, current->pid, (__u32 )regs->pc, opcode); + current->comm,task_pid_nr (current), (__u32 )regs->pc, opcode); } }
arch/sh64/mm/fault.c renamed from arch/sh64/mm/fault.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -81,7 +81,7 @@ static inline void print_vma(struct vm_astatic inline void print_task (struct task_struct *tsk) { -printk ("Task pid %d\n" , tsk->pid); +printk ("Task pid %d\n" ,task_pid_nr (tsk)); }static pte_t *lookup_pte (struct mm_struct *mm,unsigned long address)
@@ -272,7 +272,7 @@ bad_area:* usermode, so only need a few */ count++;printk ("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx\n" , - address, current->pid, current->comm, + address,task_pid_nr (current), current->comm, (unsigned long ) regs->pc);#if 0 show_regs (regs);
arch/sparc/kernel/ptrace.c renamed from arch/sparc/kernel/ptrace.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -155,7 +155,7 @@ static inline void read_sunos_user(struc/* Rest of them are completely unsupported. */ default :printk ("%s [%d]: Wants to read user offset %ld\n" , - current->comm, current->pid, offset); + current->comm,task_pid_nr (current), offset);pt_error_return (regs,EIO );return ; }
@@ -222,7 +222,7 @@ static inline void write_sunos_user(stru/* Rest of them are completely unsupported or "no-touch". */ default :printk ("%s [%d]: Wants to write user offset %ld\n" , - current->comm, current->pid, offset); + current->comm,task_pid_nr (current), offset); goto failure; } success:
arch/sparc/kernel/sys_sparc.c renamed from arch/sparc/kernel/sys_sparc.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -357,7 +357,7 @@ c_sys_nis_syscall (struct pt_regs *regs)if (count++ >5 )return -ENOSYS ;printk ("%s[%d]: Unimplemented SPARC system call %d\n" , - current->comm, current->pid, (int )regs->u_regs[1 ]); + current->comm,task_pid_nr (current), (int )regs->u_regs[1 ]);#ifdef DEBUG_UNIMP_SYSCALL show_regs (regs);#endif
arch/sparc/kernel/traps.c renamed from arch/sparc/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -38,7 +38,7 @@ struct trap_trace_entry trapbuf[1024];void syscall_trace_entry (struct pt_regs *regs) { -printk ("%s[%d]: " , current->comm, current->pid); +printk ("%s[%d]: " , current->comm,task_pid_nr (current));printk ("scall<%d> (could be %d)\n" , (int ) regs->u_regs[UREG_G1 ], (int ) regs->u_regs[UREG_I0 ]); }
@@ -99,7 +99,7 @@ void die_if_kernel(char *str, struct pt_" /_| \\__/ |_\\\n" " \\__U_/\n"); -printk ("%s(%d): %s [#%d]\n" , current->comm, current->pid, str, ++die_counter); +printk ("%s(%d): %s [#%d]\n" , current->comm,task_pid_nr (current), str, ++die_counter);show_regs (regs);add_taint (TAINT_DIE );
arch/sparc64/kernel/traps.c renamed from arch/sparc64/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -2225,7 +2225,7 @@ void die_if_kernel(char *str, struct pt_" /_| \\__/ |_\\\n" " \\__U_/\n"); -printk ("%s(%d): %s [#%d]\n" , current->comm, current->pid, str, ++die_counter); +printk ("%s(%d): %s [#%d]\n" , current->comm,task_pid_nr (current), str, ++die_counter);notify_die (DIE_OOPS , str, regs,0 ,255 ,SIGSEGV ); __asm__ __volatile__("flushw" );__show_regs (regs);
arch/um/sys-x86_64/sysrq.c renamed from arch/um/sys-x86_64/sysrq.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -15,8 +15,8 @@ void __show_regs(struct pt_regs * regs) {printk ("\n" );print_modules (); -printk ("Pid: %d, comm: %.20s %s %s\n" , - current->pid, current->comm,print_tainted (),init_utsname ()->release); +printk ("Pid: %d, comm: %.20s %s %s\n" ,task_pid_nr (current), + current->comm,print_tainted (),init_utsname ()->release);printk ("RIP: %04lx:[<%016lx>] " ,PT_REGS_CS (regs) &0xffff ,PT_REGS_RIP (regs)); printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs),
arch/x86/kernel/process_32.c renamed from arch/x86/kernel/process_32.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +1 -1
@@ -301,7 +301,7 @@ void show_regs(struct pt_regs * regs)unsigned long d0, d1, d2, d3, d6, d7;printk ("\n" ); -printk ("Pid: %d, comm: %20s\n" , current->pid, current->comm); +printk ("Pid: %d, comm: %20s\n" ,task_pid_nr (current), current->comm);printk ("EIP: %04x:[<%08lx>] CPU: %d\n" ,0xffff & regs->xcs,regs->eip,smp_processor_id ());print_symbol ("EIP is at %s\n" , regs->eip);
arch/x86/kernel/signal_32.c renamed from arch/x86/kernel/signal_32.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -200,8 +200,8 @@ badframe:if (show_unhandled_signals &&printk_ratelimit ())printk ("%s%s[%d] bad frame in sigreturn frame:%p eip:%lx" " esp:%lx oeax:%lx\n" , - current->pid >1 ?KERN_INFO :KERN_EMERG , - current->comm, current->pid, frame, regs->eip, +task_pid_nr (current) >1 ?KERN_INFO :KERN_EMERG , + current->comm,task_pid_nr (current), frame, regs->eip, regs->esp, regs->orig_eax);force_sig (SIGSEGV , current);
arch/x86/kernel/traps_32.c renamed from arch/x86/kernel/traps_32.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -316,7 +316,7 @@ void show_registers(struct pt_regs *regsprintk (KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n" , regs->xds &0xffff , regs->xes &0xffff , regs->xfs &0xffff , gs, ss);printk (KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)" , -TASK_COMM_LEN , current->comm, current->pid, +TASK_COMM_LEN , current->comm,task_pid_nr (current),current_thread_info (), current,task_thread_info (current));/* * When in-kernel, we also print out the stack and code at the
@@ -622,7 +622,7 @@ fastcall void __kprobes do_general_prote printk_ratelimit())printk (KERN_INFO "%s[%d] general protection eip:%lx esp:%lx error:%lx\n" , - current->comm, current->pid, + current->comm,task_pid_nr (current), regs->eip, regs->esp, error_code);force_sig (SIGSEGV , current);
arch/x86/mm/fault_32.c renamed from arch/x86/mm/fault_32.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +2 -2
@@ -471,8 +471,8 @@ bad_area_nosemaphore: printk_ratelimit()) {printk ("%s%s[%d]: segfault at %08lx eip %08lx " "esp %08lx error %lx\n" , - tsk->pid >1 ?KERN_INFO :KERN_EMERG , - tsk->comm, tsk->pid, address, regs->eip, +task_pid_nr (tsk) >1 ?KERN_INFO :KERN_EMERG , + tsk->comm,task_pid_nr (tsk), address, regs->eip, regs->esp, error_code); } tsk->thread.cr2 = address;
arch/xtensa/kernel/traps.c renamed from arch/xtensa/kernel/traps.c~use-helpers-to-obtain-task-pid-in-printks-arch-code +3 -3
@@ -176,7 +176,7 @@ void do_unhandled(struct pt_regs *regs,printk ("Caught unhandled exception in '%s' " "(pid = %d, pc = %#010lx) - should not happen\n" "\tEXCCAUSE is %ld\n" , - current->comm, current->pid, regs->pc, exccause); + current->comm,task_pid_nr (current), regs->pc, exccause);force_sig (SIGILL , current); }
@@ -228,7 +228,7 @@ do_illegal_instruction(struct pt_regs *r/* If in user mode, send SIGILL signal to current process. */ printk ("Illegal Instruction in '%s' (pid = %d, pc = %#010lx)\n" , - current->comm, current->pid, regs->pc); + current->comm,task_pid_nr (current), regs->pc);force_sig (SIGILL , current); }
@@ -254,7 +254,7 @@ do_unaligned_user (struct pt_regs *regs) current->thread.error_code =-3 ;printk ("Unaligned memory access to %08lx in '%s' " "(pid = %d, pc = %#010lx)\n" , - regs->excvaddr, current->comm, current->pid, regs->pc); + regs->excvaddr, current->comm,task_pid_nr (current), regs->pc); info.si_signo =SIGBUS ; info.si_errno =0 ; info.si_code =BUS_ADRALN ;
_