diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-03 01:41:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-03 01:41:11 -0400 |
commit | 7d992feb7694a21ee81f22894b455dadd5d1c110 (patch) | |
tree | d0f0961186b1c31c536a26a7f986ad7ca677453b /lib | |
parent | 6e4664525b1db28f8c4e1130957f70a94c19213e (diff) | |
parent | 25f27ce4a6a4995c8bdd69b4b2180465ed5ad2b8 (diff) |
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney:
"
* Update RCU documentation. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/611.
* Miscellaneous fixes. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/619.
* Full-system idle detection. This is for use by Frederic
Weisbecker's adaptive-ticks mechanism. Its purpose is
to allow the timekeeping CPU to shut off its tick when
all other CPUs are idle. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/648.
* Improve rcutorture test coverage. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/675.
"
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/debugobjects.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 37061ede8b81..bf2c8b1043d8 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -381,19 +381,21 @@ void debug_object_init_on_stack(void *addr, struct debug_obj_descr *descr) | |||
381 | * debug_object_activate - debug checks when an object is activated | 381 | * debug_object_activate - debug checks when an object is activated |
382 | * @addr: address of the object | 382 | * @addr: address of the object |
383 | * @descr: pointer to an object specific debug description structure | 383 | * @descr: pointer to an object specific debug description structure |
384 | * Returns 0 for success, -EINVAL for check failed. | ||
384 | */ | 385 | */ |
385 | void debug_object_activate(void *addr, struct debug_obj_descr *descr) | 386 | int debug_object_activate(void *addr, struct debug_obj_descr *descr) |
386 | { | 387 | { |
387 | enum debug_obj_state state; | 388 | enum debug_obj_state state; |
388 | struct debug_bucket *db; | 389 | struct debug_bucket *db; |
389 | struct debug_obj *obj; | 390 | struct debug_obj *obj; |
390 | unsigned long flags; | 391 | unsigned long flags; |
392 | int ret; | ||
391 | struct debug_obj o = { .object = addr, | 393 | struct debug_obj o = { .object = addr, |
392 | .state = ODEBUG_STATE_NOTAVAILABLE, | 394 | .state = ODEBUG_STATE_NOTAVAILABLE, |
393 | .descr = descr }; | 395 | .descr = descr }; |
394 | 396 | ||
395 | if (!debug_objects_enabled) | 397 | if (!debug_objects_enabled) |
396 | return; | 398 | return 0; |
397 | 399 | ||
398 | db = get_bucket((unsigned long) addr); | 400 | db = get_bucket((unsigned long) addr); |
399 | 401 | ||
@@ -405,23 +407,26 @@ void debug_object_activate(void *addr, struct debug_obj_descr *descr) | |||
405 | case ODEBUG_STATE_INIT: | 407 | case ODEBUG_STATE_INIT: |
406 | case ODEBUG_STATE_INACTIVE: | 408 | case ODEBUG_STATE_INACTIVE: |
407 | obj->state = ODEBUG_STATE_ACTIVE; | 409 | obj->state = ODEBUG_STATE_ACTIVE; |
410 | ret = 0; | ||
408 | break; | 411 | break; |
409 | 412 | ||
410 | case ODEBUG_STATE_ACTIVE: | 413 | case ODEBUG_STATE_ACTIVE: |
411 | debug_print_object(obj, "activate"); | 414 | debug_print_object(obj, "activate"); |
412 | state = obj->state; | 415 | state = obj->state; |
413 | raw_spin_unlock_irqrestore(&db->lock, flags); | 416 | raw_spin_unlock_irqrestore(&db->lock, flags); |
414 | debug_object_fixup(descr->fixup_activate, addr, state); | 417 | ret = debug_object_fixup(descr->fixup_activate, addr, state); |
415 | return; | 418 | return ret ? -EINVAL : 0; |
416 | 419 | ||
417 | case ODEBUG_STATE_DESTROYED: | 420 | case ODEBUG_STATE_DESTROYED: |
418 | debug_print_object(obj, "activate"); | 421 | debug_print_object(obj, "activate"); |
422 | ret = -EINVAL; | ||
419 | break; | 423 | break; |
420 | default: | 424 | default: |
425 | ret = 0; | ||
421 | break; | 426 | break; |
422 | } | 427 | } |
423 | raw_spin_unlock_irqrestore(&db->lock, flags); | 428 | raw_spin_unlock_irqrestore(&db->lock, flags); |
424 | return; | 429 | return ret; |
425 | } | 430 | } |
426 | 431 | ||
427 | raw_spin_unlock_irqrestore(&db->lock, flags); | 432 | raw_spin_unlock_irqrestore(&db->lock, flags); |
@@ -431,8 +436,11 @@ void debug_object_activate(void *addr, struct debug_obj_descr *descr) | |||
431 | * true or not. | 436 | * true or not. |
432 | */ | 437 | */ |
433 | if (debug_object_fixup(descr->fixup_activate, addr, | 438 | if (debug_object_fixup(descr->fixup_activate, addr, |
434 | ODEBUG_STATE_NOTAVAILABLE)) | 439 | ODEBUG_STATE_NOTAVAILABLE)) { |
435 | debug_print_object(&o, "activate"); | 440 | debug_print_object(&o, "activate"); |
441 | return -EINVAL; | ||
442 | } | ||
443 | return 0; | ||
436 | } | 444 | } |
437 | 445 | ||
438 | /** | 446 | /** |