diff options
-rw-r--r-- | arch/x86/kernel/traps_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/traps_64.c | 1 | ||||
-rw-r--r-- | include/linux/workqueue.h | 14 | ||||
-rw-r--r-- | kernel/lockdep.c | 12 | ||||
-rw-r--r-- | kernel/workqueue.c | 5 |
5 files changed, 24 insertions, 9 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index c88bbffcaa03..02d1e1e58e81 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -541,6 +541,7 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \ | |||
541 | info.si_errno = 0; \ | 541 | info.si_errno = 0; \ |
542 | info.si_code = sicode; \ | 542 | info.si_code = sicode; \ |
543 | info.si_addr = (void __user *)siaddr; \ | 543 | info.si_addr = (void __user *)siaddr; \ |
544 | trace_hardirqs_fixup(); \ | ||
544 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ | 545 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ |
545 | == NOTIFY_STOP) \ | 546 | == NOTIFY_STOP) \ |
546 | return; \ | 547 | return; \ |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index d11525ad81b4..cc68b92316cd 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -635,6 +635,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ | |||
635 | info.si_errno = 0; \ | 635 | info.si_errno = 0; \ |
636 | info.si_code = sicode; \ | 636 | info.si_code = sicode; \ |
637 | info.si_addr = (void __user *)siaddr; \ | 637 | info.si_addr = (void __user *)siaddr; \ |
638 | trace_hardirqs_fixup(); \ | ||
638 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ | 639 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ |
639 | == NOTIFY_STOP) \ | 640 | == NOTIFY_STOP) \ |
640 | return; \ | 641 | return; \ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7daafdc2514b..7f28c32d9aca 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -149,19 +149,27 @@ struct execute_work { | |||
149 | 149 | ||
150 | extern struct workqueue_struct * | 150 | extern struct workqueue_struct * |
151 | __create_workqueue_key(const char *name, int singlethread, | 151 | __create_workqueue_key(const char *name, int singlethread, |
152 | int freezeable, struct lock_class_key *key); | 152 | int freezeable, struct lock_class_key *key, |
153 | const char *lock_name); | ||
153 | 154 | ||
154 | #ifdef CONFIG_LOCKDEP | 155 | #ifdef CONFIG_LOCKDEP |
155 | #define __create_workqueue(name, singlethread, freezeable) \ | 156 | #define __create_workqueue(name, singlethread, freezeable) \ |
156 | ({ \ | 157 | ({ \ |
157 | static struct lock_class_key __key; \ | 158 | static struct lock_class_key __key; \ |
159 | const char *__lock_name; \ | ||
160 | \ | ||
161 | if (__builtin_constant_p(name)) \ | ||
162 | __lock_name = (name); \ | ||
163 | else \ | ||
164 | __lock_name = #name; \ | ||
158 | \ | 165 | \ |
159 | __create_workqueue_key((name), (singlethread), \ | 166 | __create_workqueue_key((name), (singlethread), \ |
160 | (freezeable), &__key); \ | 167 | (freezeable), &__key, \ |
168 | __lock_name); \ | ||
161 | }) | 169 | }) |
162 | #else | 170 | #else |
163 | #define __create_workqueue(name, singlethread, freezeable) \ | 171 | #define __create_workqueue(name, singlethread, freezeable) \ |
164 | __create_workqueue_key((name), (singlethread), (freezeable), NULL) | 172 | __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL) |
165 | #endif | 173 | #endif |
166 | 174 | ||
167 | #define create_workqueue(name) __create_workqueue((name), 0, 0) | 175 | #define create_workqueue(name) __create_workqueue((name), 0, 0) |
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 723bd9f92556..4335f12a27c6 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -2943,9 +2943,10 @@ void lockdep_free_key_range(void *start, unsigned long size) | |||
2943 | struct list_head *head; | 2943 | struct list_head *head; |
2944 | unsigned long flags; | 2944 | unsigned long flags; |
2945 | int i; | 2945 | int i; |
2946 | int locked; | ||
2946 | 2947 | ||
2947 | raw_local_irq_save(flags); | 2948 | raw_local_irq_save(flags); |
2948 | graph_lock(); | 2949 | locked = graph_lock(); |
2949 | 2950 | ||
2950 | /* | 2951 | /* |
2951 | * Unhash all classes that were created by this module: | 2952 | * Unhash all classes that were created by this module: |
@@ -2959,7 +2960,8 @@ void lockdep_free_key_range(void *start, unsigned long size) | |||
2959 | zap_class(class); | 2960 | zap_class(class); |
2960 | } | 2961 | } |
2961 | 2962 | ||
2962 | graph_unlock(); | 2963 | if (locked) |
2964 | graph_unlock(); | ||
2963 | raw_local_irq_restore(flags); | 2965 | raw_local_irq_restore(flags); |
2964 | } | 2966 | } |
2965 | 2967 | ||
@@ -2969,6 +2971,7 @@ void lockdep_reset_lock(struct lockdep_map *lock) | |||
2969 | struct list_head *head; | 2971 | struct list_head *head; |
2970 | unsigned long flags; | 2972 | unsigned long flags; |
2971 | int i, j; | 2973 | int i, j; |
2974 | int locked; | ||
2972 | 2975 | ||
2973 | raw_local_irq_save(flags); | 2976 | raw_local_irq_save(flags); |
2974 | 2977 | ||
@@ -2987,7 +2990,7 @@ void lockdep_reset_lock(struct lockdep_map *lock) | |||
2987 | * Debug check: in the end all mapped classes should | 2990 | * Debug check: in the end all mapped classes should |
2988 | * be gone. | 2991 | * be gone. |
2989 | */ | 2992 | */ |
2990 | graph_lock(); | 2993 | locked = graph_lock(); |
2991 | for (i = 0; i < CLASSHASH_SIZE; i++) { | 2994 | for (i = 0; i < CLASSHASH_SIZE; i++) { |
2992 | head = classhash_table + i; | 2995 | head = classhash_table + i; |
2993 | if (list_empty(head)) | 2996 | if (list_empty(head)) |
@@ -3000,7 +3003,8 @@ void lockdep_reset_lock(struct lockdep_map *lock) | |||
3000 | } | 3003 | } |
3001 | } | 3004 | } |
3002 | } | 3005 | } |
3003 | graph_unlock(); | 3006 | if (locked) |
3007 | graph_unlock(); | ||
3004 | 3008 | ||
3005 | out_restore: | 3009 | out_restore: |
3006 | raw_local_irq_restore(flags); | 3010 | raw_local_irq_restore(flags); |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 52d5e7c9a8e6..8db0b597509e 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -722,7 +722,8 @@ static void start_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu) | |||
722 | struct workqueue_struct *__create_workqueue_key(const char *name, | 722 | struct workqueue_struct *__create_workqueue_key(const char *name, |
723 | int singlethread, | 723 | int singlethread, |
724 | int freezeable, | 724 | int freezeable, |
725 | struct lock_class_key *key) | 725 | struct lock_class_key *key, |
726 | const char *lock_name) | ||
726 | { | 727 | { |
727 | struct workqueue_struct *wq; | 728 | struct workqueue_struct *wq; |
728 | struct cpu_workqueue_struct *cwq; | 729 | struct cpu_workqueue_struct *cwq; |
@@ -739,7 +740,7 @@ struct workqueue_struct *__create_workqueue_key(const char *name, | |||
739 | } | 740 | } |
740 | 741 | ||
741 | wq->name = name; | 742 | wq->name = name; |
742 | lockdep_init_map(&wq->lockdep_map, name, key, 0); | 743 | lockdep_init_map(&wq->lockdep_map, lock_name, key, 0); |
743 | wq->singlethread = singlethread; | 744 | wq->singlethread = singlethread; |
744 | wq->freezeable = freezeable; | 745 | wq->freezeable = freezeable; |
745 | INIT_LIST_HEAD(&wq->list); | 746 | INIT_LIST_HEAD(&wq->list); |