On Sun, 22 May 2011 16:48:34 +0200 Richard Weinberger <rich...@nod.at> wrote:
> +static void show_segv_info(struct uml_pt_regs *regs) > +{ > + struct task_struct *tsk = current; > + struct faultinfo *fi = UPT_FAULTINFO(regs); > + > + if (!unhandled_signal(tsk, SIGSEGV)) > + return; > + > + if (!printk_ratelimit()) > + return; > + > + printk("%s%s[%d]: segfault at %lx ip %p sp %p error %x", > + task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, > + tsk->comm, task_pid_nr(tsk), FAULT_ADDRESS(*fi), > + (void *)UPT_IP(regs), (void *)UPT_SP(regs), > + fi->error_code); > + > + print_vma_addr(KERN_CONT " in ", UPT_IP(regs)); > + printk(KERN_CONT "\n"); > +} Please see the nice comment in printk.h /* * Please don't use printk_ratelimit(), because it shares ratelimiting state * with all other unrelated printk_ratelimit() callsites. Instead use * printk_ratelimited() or plain old __ratelimit(). */ I thought we had a checkpatch rule for this but apparently I dreamed it. ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel