diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-12 20:33:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-12 20:33:21 -0400 |
commit | 480c93df5b99699390f93a7024c9f60d09da0e96 (patch) | |
tree | b93b6c8c71c5f2e716dd05b126e01ef4e20ff0af /kernel | |
parent | aecfcde920da8d32949f6cbbc1fc051b4ef9e7be (diff) | |
parent | d820ac4c2fa881079e6b689d2098adce337558ae (diff) |
Merge branch 'core/locking' into tracing/ftrace
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 7 | ||||
-rw-r--r-- | kernel/softirq.c | 4 | ||||
-rw-r--r-- | kernel/user.c | 14 |
3 files changed, 9 insertions, 16 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index cb70c1db85d0..71b567f52813 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -434,13 +434,6 @@ atomic_t nr_find_usage_forwards_checks; | |||
434 | atomic_t nr_find_usage_forwards_recursions; | 434 | atomic_t nr_find_usage_forwards_recursions; |
435 | atomic_t nr_find_usage_backwards_checks; | 435 | atomic_t nr_find_usage_backwards_checks; |
436 | atomic_t nr_find_usage_backwards_recursions; | 436 | atomic_t nr_find_usage_backwards_recursions; |
437 | # define debug_atomic_inc(ptr) atomic_inc(ptr) | ||
438 | # define debug_atomic_dec(ptr) atomic_dec(ptr) | ||
439 | # define debug_atomic_read(ptr) atomic_read(ptr) | ||
440 | #else | ||
441 | # define debug_atomic_inc(ptr) do { } while (0) | ||
442 | # define debug_atomic_dec(ptr) do { } while (0) | ||
443 | # define debug_atomic_read(ptr) 0 | ||
444 | #endif | 437 | #endif |
445 | 438 | ||
446 | /* | 439 | /* |
diff --git a/kernel/softirq.c b/kernel/softirq.c index bbf6d6496f05..7571bcb71be4 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -191,7 +191,7 @@ asmlinkage void __do_softirq(void) | |||
191 | account_system_vtime(current); | 191 | account_system_vtime(current); |
192 | 192 | ||
193 | __local_bh_disable((unsigned long)__builtin_return_address(0)); | 193 | __local_bh_disable((unsigned long)__builtin_return_address(0)); |
194 | trace_softirq_enter(); | 194 | lockdep_softirq_enter(); |
195 | 195 | ||
196 | cpu = smp_processor_id(); | 196 | cpu = smp_processor_id(); |
197 | restart: | 197 | restart: |
@@ -231,7 +231,7 @@ restart: | |||
231 | if (pending) | 231 | if (pending) |
232 | wakeup_softirqd(); | 232 | wakeup_softirqd(); |
233 | 233 | ||
234 | trace_softirq_exit(); | 234 | lockdep_softirq_exit(); |
235 | 235 | ||
236 | account_system_vtime(current); | 236 | account_system_vtime(current); |
237 | _local_bh_enable(); | 237 | _local_bh_enable(); |
diff --git a/kernel/user.c b/kernel/user.c index 6a9b696128c8..fbb300e6191f 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -286,14 +286,12 @@ int __init uids_sysfs_init(void) | |||
286 | /* work function to remove sysfs directory for a user and free up | 286 | /* work function to remove sysfs directory for a user and free up |
287 | * corresponding structures. | 287 | * corresponding structures. |
288 | */ | 288 | */ |
289 | static void remove_user_sysfs_dir(struct work_struct *w) | 289 | static void cleanup_user_struct(struct work_struct *w) |
290 | { | 290 | { |
291 | struct user_struct *up = container_of(w, struct user_struct, work); | 291 | struct user_struct *up = container_of(w, struct user_struct, work); |
292 | unsigned long flags; | 292 | unsigned long flags; |
293 | int remove_user = 0; | 293 | int remove_user = 0; |
294 | 294 | ||
295 | if (up->user_ns != &init_user_ns) | ||
296 | return; | ||
297 | /* Make uid_hash_remove() + sysfs_remove_file() + kobject_del() | 295 | /* Make uid_hash_remove() + sysfs_remove_file() + kobject_del() |
298 | * atomic. | 296 | * atomic. |
299 | */ | 297 | */ |
@@ -312,9 +310,11 @@ static void remove_user_sysfs_dir(struct work_struct *w) | |||
312 | if (!remove_user) | 310 | if (!remove_user) |
313 | goto done; | 311 | goto done; |
314 | 312 | ||
315 | kobject_uevent(&up->kobj, KOBJ_REMOVE); | 313 | if (up->user_ns == &init_user_ns) { |
316 | kobject_del(&up->kobj); | 314 | kobject_uevent(&up->kobj, KOBJ_REMOVE); |
317 | kobject_put(&up->kobj); | 315 | kobject_del(&up->kobj); |
316 | kobject_put(&up->kobj); | ||
317 | } | ||
318 | 318 | ||
319 | sched_destroy_user(up); | 319 | sched_destroy_user(up); |
320 | key_put(up->uid_keyring); | 320 | key_put(up->uid_keyring); |
@@ -335,7 +335,7 @@ static void free_user(struct user_struct *up, unsigned long flags) | |||
335 | atomic_inc(&up->__count); | 335 | atomic_inc(&up->__count); |
336 | spin_unlock_irqrestore(&uidhash_lock, flags); | 336 | spin_unlock_irqrestore(&uidhash_lock, flags); |
337 | 337 | ||
338 | INIT_WORK(&up->work, remove_user_sysfs_dir); | 338 | INIT_WORK(&up->work, cleanup_user_struct); |
339 | schedule_work(&up->work); | 339 | schedule_work(&up->work); |
340 | } | 340 | } |
341 | 341 | ||