diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-16 12:55:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-16 12:55:49 -0500 |
commit | d8c89eb3a12f0da96d049bd515c7fa3702e511c5 (patch) | |
tree | 1d9869248413dc96b935910744064d7982fd300a /kernel | |
parent | 456ef1553cb2b06729d64c1d1f0f2bda34e9b201 (diff) | |
parent | fb1dac909d94ff807cd833d340c6827c3a957159 (diff) |
Merge branch 'v2.6.24-rc7-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep
* 'v2.6.24-rc7-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep:
lockdep: more hardirq annotations for notify_die()
lockdep: fix workqueue creation API lockdep interaction
lockdep: fix internal double unlock during self-test
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 12 | ||||
-rw-r--r-- | kernel/workqueue.c | 5 |
2 files changed, 11 insertions, 6 deletions
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); |