)]}'
{
  "log": [
    {
      "commit": "3ac7fe5a4aab409bd5674d0b070bce97f9d20872",
      "tree": "5e12e8864bb8737695e4eb9c63970602d5f69e73",
      "parents": [
        "30327acf7846c5eb97c8e31c78317a2918d3e515"
      ],
      "author": {
        "name": "Thomas Gleixner",
        "email": "tglx@linutronix.de",
        "time": "Wed Apr 30 00:55:01 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:53 2008 -0700"
      },
      "message": "infrastructure to debug (dynamic) objects\n\nWe can see an ever repeating problem pattern with objects of any kind in the\nkernel:\n\n1) freeing of active objects\n2) reinitialization of active objects\n\nBoth problems can be hard to debug because the crash happens at a point where\nwe have no chance to decode the root cause anymore.  One problem spot are\nkernel timers, where the detection of the problem often happens in interrupt\ncontext and usually causes the machine to panic.\n\nWhile working on a timer related bug report I had to hack specialized code\ninto the timer subsystem to get a reasonable hint for the root cause.  This\ndebug hack was fine for temporary use, but far from a mergeable solution due\nto the intrusiveness into the timer code.\n\nThe code further lacked the ability to detect and report the root cause\ninstantly and keep the system operational.\n\nKeeping the system operational is important to get hold of the debug\ninformation without special debugging aids like serial consoles and special\nknowledge of the bug reporter.\n\nThe problems described above are not restricted to timers, but timers tend to\nexpose it usually in a full system crash.  Other objects are less explosive,\nbut the symptoms caused by such mistakes can be even harder to debug.\n\nInstead of creating specialized debugging code for the timer subsystem a\ngeneric infrastructure is created which allows developers to verify their code\nand provides an easy to enable debug facility for users in case of trouble.\n\nThe debugobjects core code keeps track of operations on static and dynamic\nobjects by inserting them into a hashed list and sanity checking them on\nobject operations and provides additional checks whenever kernel memory is\nfreed.\n\nThe tracked object operations are:\n- initializing an object\n- adding an object to a subsystem list\n- deleting an object from a subsystem list\n\nEach operation is sanity checked before the operation is executed and the\nsubsystem specific code can provide a fixup function which allows to prevent\nthe damage of the operation.  When the sanity check triggers a warning message\nand a stack trace is printed.\n\nThe list of operations can be extended if the need arises.  For now it\u0027s\nlimited to the requirements of the first user (timers).\n\nThe core code enqueues the objects into hash buckets.  The hash index is\ngenerated from the address of the object to simplify the lookup for the check\non kfree/vfree.  Each bucket has it\u0027s own spinlock to avoid contention on a\nglobal lock.\n\nThe debug code can be compiled in without being active.  The runtime overhead\nis minimal and could be optimized by asm alternatives.  A kernel command line\noption enables the debugging code.\n\nThanks to Ingo Molnar for review, suggestions and cleanup patches.\n\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Greg KH \u003cgreg@kroah.com\u003e\nCc: Randy Dunlap \u003crandy.dunlap@oracle.com\u003e\nCc: Kay Sievers \u003ckay.sievers@vrfy.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
