)]}'
{
  "commit": "09a81269c7aadaec3375a7ebd9647acbb72f5a67",
  "tree": "bb823a19c56cc4a9d6110485ff05acb24f2ee578",
  "parents": [
    "307d114441f905e4576871ff28d06408a1af1a7e"
  ],
  "author": {
    "name": "Jarkko Lavinen",
    "email": "jlavi@iki.fi",
    "time": "Mon Dec 01 13:14:08 2008 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Dec 01 19:55:25 2008 -0800"
  },
  "message": "i82875p_edac: fix module remove\n\nFix module removal bugs of i82875p_edac.  Also i82975x_edac code seems to\nhave the same module removal bugs as in i82875p_edac.\n\nThe problems were:\n\n1. In module removal i82875p_remove_one() is never called.\n\n   Variable i82875p_registered is newer changed from 1, which\n   guarantees i82875p_remove_one() is not called (and even if it were\n   called, it would be called in wrong order).\n\n   As a result, the edac_mc workque is not stopped and keeps probing.\n   If kernel debugging options are not enabled, user may not notice\n   anything going wrong.\n\n   if debugging options are enabled and I do \"rmmod i82875p_edac\", I\n   get:\n\n      edac debug: edac_pci_workq_function() checking\n      BUG: unable to handle kernel paging request at f882d16f\n      ...\n      call trace:\n       [\u003cf8834df3\u003e] ? edac_mc_workq_function+0x55/0x7e [edac_core]\n       [\u003cc0233974\u003e] ? run_workqueue+0xd7/0x1a5\n       [\u003cc023392f\u003e] ? run_workqueue+0x92/0x1a5\n       [\u003cf8834d9e\u003e] ? edac_mc_workq_function+0x0/0x7e [edac_core]\n       [\u003cc0233af9\u003e] ? worker_thread+0xb7/0xc3\n       [\u003cc0236a7b\u003e] ? autoremove_wake_function+0x0/0x33\n       [\u003cc0233a42\u003e] ? worker_thread+0x0/0xc3\n       [\u003cc0236809\u003e] ? kthread+0x3b/0x61\n       [\u003cc02367ce\u003e] ? kthread+0x0/0x61\n       [\u003cc0204587\u003e] ? kernel_thread_helper+0x7/0x10\n\n   Fix for this is to get rid of needles variable i82875p_registered\n   altogether and run i82875p_remove_one() *before*\n   pci_unregister_driver().\n\n2. edac_mc_del_mc() uses mci after freeing mci\n\n   edac_mc_del_mc() calls calls edac_remove_sysfs_mci_device().  The\n   kobject refcount of mci drops to 0 and mci is freed.  After this\n   mci is accessed via debug print and i82875p_remove_one() still\n   uses mci-\u003epvt and tries to free mci again with edac_mc_free().\n\n   The fix for this is add kobject_get(\u0026mci-\u003eedac_mci_kobj) after\n   edac_mc_alloc(). Then the mci is still available after returning\n   from edac_mc_del_mc() with refcount 1, and mci-\u003epvt is still\n   available. When i82875p_remove_one() finally calls edac_mc_free(),\n   this will cause kobject_put() and mci is released properly.\n\nSigned-off-by: Jarkko Lavinen \u003cjlavi@iki.fi\u003e\nCc: Doug Thompson \u003cnorsk5@yahoo.com\u003e\nCc: Alan Cox \u003calan@lxorguk.ukuu.org.uk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7f909972fecd673c832f1c562468aacc44dde0d7",
      "old_mode": 33188,
      "old_path": "drivers/edac/i82875p_edac.c",
      "new_id": "ebb037b78758f5f86f06abba1613121f8195d858",
      "new_mode": 33188,
      "new_path": "drivers/edac/i82875p_edac.c"
    }
  ]
}
