)]}'
{
  "commit": "8f9f665a707721146f24a892b1a0da1ab4da1d58",
  "tree": "75850b4a284ac671b7f1b563c985b959181aa70d",
  "parents": [
    "3afb69cb5572b3c8c898c00880803cf1a49852c4"
  ],
  "author": {
    "name": "Lai Jiangshan",
    "email": "laijs@cn.fujitsu.com",
    "time": "Fri Jun 06 14:37:11 2014 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Jun 06 16:08:12 2014 -0700"
  },
  "message": "idr: fix unexpected ID-removal when idr_remove(unallocated_id)\n\nIf unallocated_id \u003d (ANY * idr_max(idp-\u003elayers) + existing_id) is passed\nto idr_remove().  The existing_id will be removed unexpectedly.\n\nThe following test shows this unexpected id-removal:\n\n  static void test4(void)\n  {\n        int id;\n        DEFINE_IDR(test_idr);\n\n        printk(KERN_INFO \"Start test4\\n\");\n        id \u003d idr_alloc(\u0026test_idr, (void *)1, 42, 43, GFP_KERNEL);\n        BUG_ON(id !\u003d 42);\n        idr_remove(\u0026test_idr, 42 + IDR_SIZE);\n        TEST_BUG_ON(idr_find(\u0026test_idr, 42) !\u003d (void *)1);\n        idr_destroy(\u0026test_idr);\n        printk(KERN_INFO \"End of test4\\n\");\n  }\n\nida_remove() shares the similar problem.\n\nIt happens only when the caller tries to free an unallocated ID which is\nthe caller\u0027s fault.  It is not a bug.  But it is better to add the\nproper check and complain rather than removing an existing_id silently.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\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": "4df67928816e0fc2cb8d66336d03925dbbd5f136",
      "old_mode": 33188,
      "old_path": "lib/idr.c",
      "new_id": "c4afd94bdf69abd2a09ff4e75222592d976a796c",
      "new_mode": 33188,
      "new_path": "lib/idr.c"
    }
  ]
}
