)]}'
{
  "commit": "2a7f0e53daf29ca6dc9fbe2a27158f13474ec1b5",
  "tree": "e4abde280e962ea1da9bc6f5acf3400ed2d269e5",
  "parents": [
    "fa5b57175364431245b006c2afcbf94dc2b15400"
  ],
  "author": {
    "name": "Gustavo A. R. Silva",
    "email": "gustavo@embeddedor.com",
    "time": "Thu Aug 29 12:29:16 2019 -0500"
  },
  "committer": {
    "name": "Mimi Zohar",
    "email": "zohar@linux.ibm.com",
    "time": "Thu Aug 29 14:23:30 2019 -0400"
  },
  "message": "ima: ima_api: Use struct_size() in kzalloc()\n\nOne of the more common cases of allocation size calculations is finding\nthe size of a structure that has a zero-sized array at the end, along\nwith memory for some number of elements for that array. For example:\n\nstruct ima_template_entry {\n\t...\n        struct ima_field_data template_data[0]; /* template related data */\n};\n\ninstance \u003d kzalloc(sizeof(struct ima_template_entry) + count * sizeof(struct ima_field_data), GFP_NOFS);\n\nInstead of leaving these open-coded and prone to type mistakes, we can\nnow use the new struct_size() helper:\n\ninstance \u003d kzalloc(struct_size(instance, entry, count), GFP_NOFS);\n\nThis code was detected with the help of Coccinelle.\n\nSigned-off-by: Gustavo A. R. Silva \u003cgustavo@embeddedor.com\u003e\nSigned-off-by: Mimi Zohar \u003czohar@linux.ibm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "65224474675b9d145dcc383d01cac66ad42fd626",
      "old_mode": 33188,
      "old_path": "security/integrity/ima/ima_api.c",
      "new_id": "610759fe63b8a450a67b2f74917f5910181a90b9",
      "new_mode": 33188,
      "new_path": "security/integrity/ima/ima_api.c"
    }
  ]
}
