)]}'
{
  "commit": "1ddbcb005c395518c2cd0df504cff3d4b5c85853",
  "tree": "03567b8b50d3094ae13c64b44890f9c0d53361b7",
  "parents": [
    "cf8da764fc6959b7efb482f375dfef9830e98205"
  ],
  "author": {
    "name": "Eric Dumazet",
    "email": "dada1@cosmosbay.com",
    "time": "Tue May 19 20:14:28 2009 +0000"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Wed May 20 17:18:02 2009 -0700"
  },
  "message": "net: fix rtable leak in net/ipv4/route.c\n\nAlexander V. Lukyanov found a regression in 2.6.29 and made a complete\nanalysis found in http://bugzilla.kernel.org/show_bug.cgi?id\u003d13339\nQuoted here because its a perfect one :\n\nbegin_of_quotation\n 2.6.29 patch has introduced flexible route cache rebuilding. Unfortunately the\n patch has at least one critical flaw, and another problem.\n\n rt_intern_hash calculates rthi pointer, which is later used for new entry\n insertion. The same loop calculates cand pointer which is used to clean the\n list. If the pointers are the same, rtable leak occurs, as first the cand is\n removed then the new entry is appended to it.\n\n This leak leads to unregister_netdevice problem (usage count \u003e 0).\n\n Another problem of the patch is that it tries to insert the entries in certain\n order, to facilitate counting of entries distinct by all but QoS parameters.\n Unfortunately, referencing an existing rtable entry moves it to list beginning,\n to speed up further lookups, so the carefully built order is destroyed.\n\n For the first problem the simplest patch it to set rthi\u003d0 when rthi\u003d\u003dcand, but\n it will also destroy the ordering.\nend_of_quotation\n\nProblematic commit is 1080d709fb9d8cd4392f93476ee46a9d6ea05a5b\n(net: implement emergency route cache rebulds when gc_elasticity is exceeded)\n\nTrying to keep dst_entries ordered is too complex and breaks the fact that\norder should depend on the frequency of use for garbage collection.\n\nA possible fix is to make rt_intern_hash() simpler, and only makes\nrt_check_expire() a litle bit smarter, being able to cope with an arbitrary\nentries order. The added loop is running on cache hot data, while cpu\nis prefetching next object, so should be unnoticied.\n\nReported-and-analyzed-by: Alexander V. Lukyanov \u003clav@yar.ru\u003e\nSigned-off-by: Eric Dumazet \u003cdada1@cosmosbay.com\u003e\nAcked-by: Neil Horman \u003cnhorman@tuxdriver.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "869cf1c44b78c6f643d7ffa03ab52238a014d757",
      "old_mode": 33188,
      "old_path": "net/ipv4/route.c",
      "new_id": "28205e5bfa9b703a30baed0afe83c24575080574",
      "new_mode": 33188,
      "new_path": "net/ipv4/route.c"
    }
  ]
}
