diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-17 08:32:49 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-17 08:32:49 -0400 |
| commit | 214e2ca2b82d335935a861c253fe94c61ad77aad (patch) | |
| tree | eee42ff74d10470789d919b8499737ad0e919360 /kernel/debug/debug_core.c | |
| parent | 1fdead8ad31d3aa833bc37739273fcde89ace93c (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge tag 'v3.7-rc1' into staging/for_v3.8
Linux 3.7-rc1
* tag 'v3.7-rc1': (9579 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'kernel/debug/debug_core.c')
| -rw-r--r-- | kernel/debug/debug_core.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 0557f24c6bca..9a61738cefc8 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
| @@ -672,6 +672,10 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | |||
| 672 | { | 672 | { |
| 673 | struct kgdb_state kgdb_var; | 673 | struct kgdb_state kgdb_var; |
| 674 | struct kgdb_state *ks = &kgdb_var; | 674 | struct kgdb_state *ks = &kgdb_var; |
| 675 | int ret = 0; | ||
| 676 | |||
| 677 | if (arch_kgdb_ops.enable_nmi) | ||
| 678 | arch_kgdb_ops.enable_nmi(0); | ||
| 675 | 679 | ||
| 676 | ks->cpu = raw_smp_processor_id(); | 680 | ks->cpu = raw_smp_processor_id(); |
| 677 | ks->ex_vector = evector; | 681 | ks->ex_vector = evector; |
| @@ -681,13 +685,33 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | |||
| 681 | ks->linux_regs = regs; | 685 | ks->linux_regs = regs; |
| 682 | 686 | ||
| 683 | if (kgdb_reenter_check(ks)) | 687 | if (kgdb_reenter_check(ks)) |
| 684 | return 0; /* Ouch, double exception ! */ | 688 | goto out; /* Ouch, double exception ! */ |
| 685 | if (kgdb_info[ks->cpu].enter_kgdb != 0) | 689 | if (kgdb_info[ks->cpu].enter_kgdb != 0) |
| 686 | return 0; | 690 | goto out; |
| 687 | 691 | ||
| 688 | return kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); | 692 | ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); |
| 693 | out: | ||
| 694 | if (arch_kgdb_ops.enable_nmi) | ||
| 695 | arch_kgdb_ops.enable_nmi(1); | ||
| 696 | return ret; | ||
| 689 | } | 697 | } |
| 690 | 698 | ||
| 699 | /* | ||
| 700 | * GDB places a breakpoint at this function to know dynamically | ||
| 701 | * loaded objects. It's not defined static so that only one instance with this | ||
| 702 | * name exists in the kernel. | ||
| 703 | */ | ||
| 704 | |||
| 705 | static int module_event(struct notifier_block *self, unsigned long val, | ||
| 706 | void *data) | ||
| 707 | { | ||
| 708 | return 0; | ||
| 709 | } | ||
| 710 | |||
| 711 | static struct notifier_block dbg_module_load_nb = { | ||
| 712 | .notifier_call = module_event, | ||
| 713 | }; | ||
| 714 | |||
| 691 | int kgdb_nmicallback(int cpu, void *regs) | 715 | int kgdb_nmicallback(int cpu, void *regs) |
| 692 | { | 716 | { |
| 693 | #ifdef CONFIG_SMP | 717 | #ifdef CONFIG_SMP |
| @@ -816,6 +840,7 @@ static void kgdb_register_callbacks(void) | |||
| 816 | kgdb_arch_init(); | 840 | kgdb_arch_init(); |
| 817 | if (!dbg_is_early) | 841 | if (!dbg_is_early) |
| 818 | kgdb_arch_late(); | 842 | kgdb_arch_late(); |
| 843 | register_module_notifier(&dbg_module_load_nb); | ||
| 819 | register_reboot_notifier(&dbg_reboot_notifier); | 844 | register_reboot_notifier(&dbg_reboot_notifier); |
| 820 | atomic_notifier_chain_register(&panic_notifier_list, | 845 | atomic_notifier_chain_register(&panic_notifier_list, |
| 821 | &kgdb_panic_event_nb); | 846 | &kgdb_panic_event_nb); |
| @@ -839,6 +864,7 @@ static void kgdb_unregister_callbacks(void) | |||
| 839 | if (kgdb_io_module_registered) { | 864 | if (kgdb_io_module_registered) { |
| 840 | kgdb_io_module_registered = 0; | 865 | kgdb_io_module_registered = 0; |
| 841 | unregister_reboot_notifier(&dbg_reboot_notifier); | 866 | unregister_reboot_notifier(&dbg_reboot_notifier); |
| 867 | unregister_module_notifier(&dbg_module_load_nb); | ||
| 842 | atomic_notifier_chain_unregister(&panic_notifier_list, | 868 | atomic_notifier_chain_unregister(&panic_notifier_list, |
| 843 | &kgdb_panic_event_nb); | 869 | &kgdb_panic_event_nb); |
| 844 | kgdb_arch_exit(); | 870 | kgdb_arch_exit(); |
