- 论坛徽章:
- 0
|
本帖最后由 platinum 于 2010-06-01 16:04 编辑
- 448 if (nl)
- 449 printk("\n");
- 450 if (notify_die(DIE_OOPS, str, regs, err,
- 451 current->thread.trap_no, SIGSEGV) !=
- 452 NOTIFY_STOP) {
- 453 show_registers(regs);
- 454 /* Executive summary in case the oops scrolled away */
- 455 esp = (unsigned long) (®s->esp);
- 456 savesegment(ss, ss);
- 457 if (user_mode(regs)) {
- 458 esp = regs->esp;
- 459 ss = regs->xss & 0xffff;
- 460 }
- 461 printk(KERN_EMERG "EIP: [<%08lx>] ", regs->eip);
- 462 print_symbol("%s", regs->eip);
- 463 ++++++ oops_notifier_call_chain(1, NULL);
- 464 printk(" SS:ESP %04x:%08lx\n", ss, esp);
- 465 }
- 466 else
- 467 regs = NULL;
复制代码 内核通知链参考文章:http://linux.chinaunix.net/bbs/viewthread.php?tid=1051266
如果内核不是新的,那么 module 是无法 register 自定义的 notifier_chain 的 |
|