)]}'
{
  "log": [
    {
      "commit": "b62e408c05228f40e69bb38a48db8961cac6cd23",
      "tree": "40711bad4a60adb8f331d71574ec61e13c5a352d",
      "parents": [
        "8e7ee27095aee87b5db1b0061e2ceea5878a1bbd"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Aug 26 14:29:22 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 26 20:06:52 2009 -0700"
      },
      "message": "flex_array: convert element_nr formals to unsigned\n\nIt\u0027s problematic to allow signed element_nr\u0027s or total\u0027s to be passed as\npart of the flex array API.\n\nflex_array_alloc() allows total_nr_elements to be set to a negative\nquantity, which is obviously erroneous.\n\nflex_array_get() and flex_array_put() allows negative array indices in\ndereferencing an array part, which could address memory mapped before\nstruct flex_array.\n\nThe fix is to convert all existing element_nr formals to be qualified as\nunsigned.  Existing checks to compare it to total_nr_elements or the max\narray size based on element_size need not be changed.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "105b6e8a74cac11cdf70903877593c7f202075cc",
      "tree": "387b2ef2071481cf0abb2cd2aac331ee3a62548b",
      "parents": [
        "a30b595d2ca6d39e784a1bed5f2b35f3d7a03af7"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Aug 26 14:29:20 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 26 20:06:52 2009 -0700"
      },
      "message": "flex_array: fix flex_array_free_parts comment\n\nflex_array_free_parts() does not take `src\u0027 or `element_nr\u0027 formals, so\nremove their respective comments.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a30b595d2ca6d39e784a1bed5f2b35f3d7a03af7",
      "tree": "101d1cdf6088a36a09ad5470a062331a74ab657d",
      "parents": [
        "054b2b13ccba4876a1ce98a7ede7dab7d6893d01"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Aug 26 14:29:20 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 26 20:06:52 2009 -0700"
      },
      "message": "flex_array: fix get function for elements in base starting at non-zero\n\nIf all array elements fit into the base structure and data is copied using\nflex_array_put() starting at a non-zero index, flex_array_get() will fail\nto return the data.\n\nThis fixes the bug by only checking for NULL parts when all elements do\nnot fit in the base structure when flex_array_get() is used.  Otherwise,\nfa_element_to_part_nr() will always be 0 since there are no parts\nstructures needed and such element may never have been put.  Thus, it will\nremain NULL due to the kzalloc() of the base.\n\nAdditionally, flex_array_put() now only checks for a NULL part when all\nelements do not fit in the base structure.  This is otherwise unnecessary\nsince the base structure is guaranteed to exist (or we would have already\nhit a NULL pointer).\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "07868201070d87484bd00610a4921e879be78746",
      "tree": "262e32d1261bf05280a9711f6aa951550343979e",
      "parents": [
        "a40694a38a745af0dd7d8b796597ada1dd6caeb7"
      ],
      "author": {
        "name": "Jonathan Corbet",
        "email": "corbet@lwn.net",
        "time": "Tue Aug 04 13:35:17 2009 -0600"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Aug 04 15:33:46 2009 -0700"
      },
      "message": "flex_array: remove unneeded index calculation\n\nflex_array_get() calculates an index value, then drops it on the floor;\nsimply remove it.\n\nSigned-off-by: Jonathan Corbet \u003ccorbet@lwn.net\u003e\nAcked-by: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "534acc057b5a08ec33fa57cdd2f5a09ef124e7f2",
      "tree": "186e6ff90a7a696a2d15f183871250c9d83f476d",
      "parents": [
        "a9e58f25734e153b8c6516d904e2398fb8b0b23d"
      ],
      "author": {
        "name": "Dave Hansen",
        "email": "dave@linux.vnet.ibm.com",
        "time": "Wed Jul 29 15:04:18 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 29 19:10:36 2009 -0700"
      },
      "message": "lib: flexible array implementation\n\nOnce a structure goes over PAGE_SIZE*2, we see occasional allocation\nfailures.  Some people have chosen to switch over to things like vmalloc()\nthat will let them keep array-like access to such a large structures.\nBut, vmalloc() has plenty of downsides.\n\nHere\u0027s an alternative.  I think it\u0027s what Andrew was suggesting here:\n\n\thttp://lkml.org/lkml/2009/7/2/518\n\nI call it a flexible array.  It does all of its work in PAGE_SIZE bits, so\nnever does an order\u003e0 allocation.  The base level has\nPAGE_SIZE-2*sizeof(int) bytes of storage for pointers to the second level.\n So, with a 32-bit arch, you get about 4MB (4183112 bytes) of total\nstorage when the objects pack nicely into a page.  It is half that on\n64-bit because the pointers are twice the size.  There\u0027s a table detailing\nthis in the code.\n\nThere are kerneldocs for the functions, but here\u0027s an\noverview:\n\nflex_array_alloc() - dynamically allocate a base structure\nflex_array_free() - free the array and all of the\n\t\t    second-level pages\nflex_array_free_parts() - free the second-level pages, but\n\t\t\t  not the base (for static bases)\nflex_array_put() - copy into the array at the given index\nflex_array_get() - copy out of the array at the given index\nflex_array_prealloc() - preallocate the second-level pages\n\t\t\tbetween the given indexes to\n\t\t\tguarantee no allocs will occur at\n\t\t\tput() time.\n\nWe could also potentially just pass the \"element_size\" into each of the\nAPI functions instead of storing it internally.  That would get us one\nmore base pointer on 32-bit.\n\nI\u0027ve been testing this by running it in userspace.  The header and patch\nthat I\u0027ve been using are here, as well as the little script I\u0027m using to\ngenerate the size table which goes in the kerneldocs.\n\n\thttp://sr71.net/~dave/linux/flexarray/\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
