diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 10 | ||||
-rw-r--r-- | lib/idr.c | 16 | ||||
-rw-r--r-- | lib/kobject_uevent.c | 4 | ||||
-rw-r--r-- | lib/zlib_inflate/inflate.c | 5 |
4 files changed, 20 insertions, 15 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e5889b1a33ff..554ee688a9f8 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -158,7 +158,7 @@ config DEBUG_RWSEMS | |||
158 | 158 | ||
159 | config DEBUG_LOCK_ALLOC | 159 | config DEBUG_LOCK_ALLOC |
160 | bool "Lock debugging: detect incorrect freeing of live locks" | 160 | bool "Lock debugging: detect incorrect freeing of live locks" |
161 | depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 161 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
162 | select DEBUG_SPINLOCK | 162 | select DEBUG_SPINLOCK |
163 | select DEBUG_MUTEXES | 163 | select DEBUG_MUTEXES |
164 | select DEBUG_RWSEMS | 164 | select DEBUG_RWSEMS |
@@ -173,7 +173,7 @@ config DEBUG_LOCK_ALLOC | |||
173 | 173 | ||
174 | config PROVE_LOCKING | 174 | config PROVE_LOCKING |
175 | bool "Lock debugging: prove locking correctness" | 175 | bool "Lock debugging: prove locking correctness" |
176 | depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 176 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
177 | select LOCKDEP | 177 | select LOCKDEP |
178 | select DEBUG_SPINLOCK | 178 | select DEBUG_SPINLOCK |
179 | select DEBUG_MUTEXES | 179 | select DEBUG_MUTEXES |
@@ -216,7 +216,7 @@ config PROVE_LOCKING | |||
216 | 216 | ||
217 | config LOCKDEP | 217 | config LOCKDEP |
218 | bool | 218 | bool |
219 | depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 219 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
220 | select STACKTRACE | 220 | select STACKTRACE |
221 | select FRAME_POINTER | 221 | select FRAME_POINTER |
222 | select KALLSYMS | 222 | select KALLSYMS |
@@ -224,13 +224,14 @@ config LOCKDEP | |||
224 | 224 | ||
225 | config DEBUG_LOCKDEP | 225 | config DEBUG_LOCKDEP |
226 | bool "Lock dependency engine debugging" | 226 | bool "Lock dependency engine debugging" |
227 | depends on LOCKDEP | 227 | depends on DEBUG_KERNEL && LOCKDEP |
228 | help | 228 | help |
229 | If you say Y here, the lock dependency engine will do | 229 | If you say Y here, the lock dependency engine will do |
230 | additional runtime checks to debug itself, at the price | 230 | additional runtime checks to debug itself, at the price |
231 | of more runtime overhead. | 231 | of more runtime overhead. |
232 | 232 | ||
233 | config TRACE_IRQFLAGS | 233 | config TRACE_IRQFLAGS |
234 | depends on DEBUG_KERNEL | ||
234 | bool | 235 | bool |
235 | default y | 236 | default y |
236 | depends on TRACE_IRQFLAGS_SUPPORT | 237 | depends on TRACE_IRQFLAGS_SUPPORT |
@@ -256,6 +257,7 @@ config DEBUG_LOCKING_API_SELFTESTS | |||
256 | 257 | ||
257 | config STACKTRACE | 258 | config STACKTRACE |
258 | bool | 259 | bool |
260 | depends on DEBUG_KERNEL | ||
259 | depends on STACKTRACE_SUPPORT | 261 | depends on STACKTRACE_SUPPORT |
260 | 262 | ||
261 | config DEBUG_KOBJECT | 263 | config DEBUG_KOBJECT |
@@ -38,14 +38,15 @@ static kmem_cache_t *idr_layer_cache; | |||
38 | static struct idr_layer *alloc_layer(struct idr *idp) | 38 | static struct idr_layer *alloc_layer(struct idr *idp) |
39 | { | 39 | { |
40 | struct idr_layer *p; | 40 | struct idr_layer *p; |
41 | unsigned long flags; | ||
41 | 42 | ||
42 | spin_lock(&idp->lock); | 43 | spin_lock_irqsave(&idp->lock, flags); |
43 | if ((p = idp->id_free)) { | 44 | if ((p = idp->id_free)) { |
44 | idp->id_free = p->ary[0]; | 45 | idp->id_free = p->ary[0]; |
45 | idp->id_free_cnt--; | 46 | idp->id_free_cnt--; |
46 | p->ary[0] = NULL; | 47 | p->ary[0] = NULL; |
47 | } | 48 | } |
48 | spin_unlock(&idp->lock); | 49 | spin_unlock_irqrestore(&idp->lock, flags); |
49 | return(p); | 50 | return(p); |
50 | } | 51 | } |
51 | 52 | ||
@@ -59,12 +60,14 @@ static void __free_layer(struct idr *idp, struct idr_layer *p) | |||
59 | 60 | ||
60 | static void free_layer(struct idr *idp, struct idr_layer *p) | 61 | static void free_layer(struct idr *idp, struct idr_layer *p) |
61 | { | 62 | { |
63 | unsigned long flags; | ||
64 | |||
62 | /* | 65 | /* |
63 | * Depends on the return element being zeroed. | 66 | * Depends on the return element being zeroed. |
64 | */ | 67 | */ |
65 | spin_lock(&idp->lock); | 68 | spin_lock_irqsave(&idp->lock, flags); |
66 | __free_layer(idp, p); | 69 | __free_layer(idp, p); |
67 | spin_unlock(&idp->lock); | 70 | spin_unlock_irqrestore(&idp->lock, flags); |
68 | } | 71 | } |
69 | 72 | ||
70 | /** | 73 | /** |
@@ -168,6 +171,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id) | |||
168 | { | 171 | { |
169 | struct idr_layer *p, *new; | 172 | struct idr_layer *p, *new; |
170 | int layers, v, id; | 173 | int layers, v, id; |
174 | unsigned long flags; | ||
171 | 175 | ||
172 | id = starting_id; | 176 | id = starting_id; |
173 | build_up: | 177 | build_up: |
@@ -191,14 +195,14 @@ build_up: | |||
191 | * The allocation failed. If we built part of | 195 | * The allocation failed. If we built part of |
192 | * the structure tear it down. | 196 | * the structure tear it down. |
193 | */ | 197 | */ |
194 | spin_lock(&idp->lock); | 198 | spin_lock_irqsave(&idp->lock, flags); |
195 | for (new = p; p && p != idp->top; new = p) { | 199 | for (new = p; p && p != idp->top; new = p) { |
196 | p = p->ary[0]; | 200 | p = p->ary[0]; |
197 | new->ary[0] = NULL; | 201 | new->ary[0] = NULL; |
198 | new->bitmap = new->count = 0; | 202 | new->bitmap = new->count = 0; |
199 | __free_layer(idp, new); | 203 | __free_layer(idp, new); |
200 | } | 204 | } |
201 | spin_unlock(&idp->lock); | 205 | spin_unlock_irqrestore(&idp->lock, flags); |
202 | return -1; | 206 | return -1; |
203 | } | 207 | } |
204 | new->ary[0] = p; | 208 | new->ary[0] = p; |
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 2b1530fc573b..7f20e7b857cb 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -50,10 +50,6 @@ static char *action_to_string(enum kobject_action action) | |||
50 | return "offline"; | 50 | return "offline"; |
51 | case KOBJ_ONLINE: | 51 | case KOBJ_ONLINE: |
52 | return "online"; | 52 | return "online"; |
53 | case KOBJ_DOCK: | ||
54 | return "dock"; | ||
55 | case KOBJ_UNDOCK: | ||
56 | return "undock"; | ||
57 | default: | 53 | default: |
58 | return NULL; | 54 | return NULL; |
59 | } | 55 | } |
diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c index 7f922dccf1a5..fceb97c3aff7 100644 --- a/lib/zlib_inflate/inflate.c +++ b/lib/zlib_inflate/inflate.c | |||
@@ -347,7 +347,10 @@ int zlib_inflate(z_streamp strm, int flush) | |||
347 | static const unsigned short order[19] = /* permutation of code lengths */ | 347 | static const unsigned short order[19] = /* permutation of code lengths */ |
348 | {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; | 348 | {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; |
349 | 349 | ||
350 | if (strm == NULL || strm->state == NULL || strm->next_out == NULL || | 350 | /* Do not check for strm->next_out == NULL here as ppc zImage |
351 | inflates to strm->next_out = 0 */ | ||
352 | |||
353 | if (strm == NULL || strm->state == NULL || | ||
351 | (strm->next_in == NULL && strm->avail_in != 0)) | 354 | (strm->next_in == NULL && strm->avail_in != 0)) |
352 | return Z_STREAM_ERROR; | 355 | return Z_STREAM_ERROR; |
353 | 356 | ||