)]}'
{
  "commit": "62d2feb9803f18c4e3c8a1a2c7e30a54df8a1d72",
  "tree": "dc9cf2f46467833a75b31b82b6ec307cbd741e97",
  "parents": [
    "6490311f423b0d77969d6fa2ab6354b87e373bf9"
  ],
  "author": {
    "name": "Marek Belisko",
    "email": "marek.belisko@open-nandra.com",
    "time": "Thu Apr 12 21:48:03 2012 +0200"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Thu Apr 12 14:34:31 2012 -0700"
  },
  "message": "staging: iio: hmc5843: Fix crash in probe function.\n\nFix crash after issuing:\n\techo hmc5843 0x1e \u003e /sys/class/i2c-dev/i2c-2/device/new_device\n\n\t[   37.180999] device: \u00272-001e\u0027: device_add\n\t[   37.188293] bus: \u0027i2c\u0027: add device 2-001e\n\t[   37.194549] PM: Adding info for i2c:2-001e\n\t[   37.200958] bus: \u0027i2c\u0027: driver_probe_device: matched device 2-001e with driver hmc5843\n\t[   37.210815] bus: \u0027i2c\u0027: really_probe: probing driver hmc5843 with device 2-001e\n\t[   37.224884] HMC5843 initialized\n\t[   37.228759] ------------[ cut here ]------------\n\t[   37.233612] kernel BUG at mm/slab.c:505!\n\t[   37.237701] Internal error: Oops - BUG: 0 [#1] PREEMPT\n\t[   37.243103] Modules linked in:\n\t[   37.246337] CPU: 0    Not tainted  (3.3.1-gta04+ #28)\n\t[   37.251647] PC is at kfree+0x84/0x144\n\t[   37.255493] LR is at kfree+0x20/0x144\n\t[   37.259338] pc : [\u003cc00b408c\u003e]    lr : [\u003cc00b4028\u003e]    psr: 40000093\n\t[   37.259368] sp : de249cd8  ip : 0000000c  fp : 00000090\n\t[   37.271362] r10: 0000000a  r9 : de229eac  r8 : c0236274\n\t[   37.276855] r7 : c09d6490  r6 : a0000013  r5 : de229c00  r4 : de229c10\n\t[   37.283691] r3 : c0f00218  r2 : 00000400  r1 : c0eea000  r0 : c00b4028\n\t[   37.290527] Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user\n\t[   37.298095] Control: 10c5387d  Table: 9e1d0019  DAC: 00000015\n\t[   37.304107] Process sh (pid: 91, stack limit \u003d 0xde2482f0)\n\t[   37.309844] Stack: (0xde249cd8 to 0xde24a000)\n\t[   37.314422] 9cc0:                                                       de229c10 de229c00\n\t[   37.322998] 9ce0: de229c10 ffffffea 00000005 c0236274 de140a80 c00b4798 dec00080 de140a80\n\t[   37.331573] 9d00: c032f37c dec00080 000080d0 00000001 de229c00 de229c10 c048d578 00000005\n\t[   37.340148] 9d20: de229eac 0000000a 00000090 c032fa40 00000001 00000000 00000001 de229c10\n\t[   37.348724] 9d40: de229eac 00000029 c075b558 00000001 00000003 00000004 de229c10 c048d594\n\t[   37.357299] 9d60: 00000000 60000013 00000018 205b0007 37332020 3432322e 5d343838 c0060020\n\t[   37.365905] 9d80: de251600 00000001 00000000 de251600 00000001 c0065a84 de229c00 de229c48\n\t[   37.374481] 9da0: 00000006 0048d62c de229c38 de229c00 de229c00 de1f6c00 de1f6c20 00000001\n\t[   37.383056] 9dc0: 00000000 c048d62c 00000000 de229c00 de229c00 de1f6c00 de1f6c20 00000001\n\t[   37.391632] 9de0: 00000000 c048d62c 00000000 c0330164 00000000 de1f6c20 c048d62c de1f6c00\n\t[   37.400207] 9e00: c0330078 de1f6c04 c078d714 de189b58 00000000 c02ccfd8 de1f6c20 c0795f40\n\t[   37.408782] 9e20: c0238330 00000000 00000000 c02381a8 de1b9fc0 de1f6c20 de1f6c20 de249e48\n\t[   37.417358] 9e40: c0238330 c0236bb0 decdbed8 de7d0f14 de1f6c20 de1f6c20 de1f6c54 de1f6c20\n\t[   37.425933] 9e60: 00000000 c0238030 de1f6c20 c078d7bc de1f6c20 c02377ec de1f6c20 de1f6c28\n\t[   37.434509] 9e80: dee64cb0 c0236138 c047c554 de189b58 00000000 c004b45c de1f6c20 de1f6cd8\n\t[   37.443084] 9ea0: c0edfa6c de1f6c00 dee64c68 de1f6c04 de1f6c20 dee64cb8 c047c554 de189b58\n\t[   37.451690] 9ec0: 00000000 c02cd634 dee64c68 de249ef4 de23b008 dee64cb0 0000000d de23b000\n\t[   37.460266] 9ee0: de23b007 c02cd78c 00000002 00000000 00000000 35636d68 00333438 00000000\n\t[   37.468841] 9f00: 00000000 00000000 001e0000 00000000 00000000 00000000 00000000 0a10cec0\n\t[   37.477416] 9f20: 00000002 de249f80 0000000d dee62990 de189b40 c0234d88 0000000d c010c354\n\t[   37.485992] 9f40: 0000000d de210f28 000acc88 de249f80 0000000d de248000 00000000 c00b7bf8\n\t[   37.494567] 9f60: de210f28 000acc88 de210f28 000acc88 00000000 00000000 0000000d c00b7ed8\n\t[   37.503143] 9f80: 00000000 00000000 0000000d 00000000 0007fa28 0000000d 000acc88 00000004\n\t[   37.511718] 9fa0: c000e544 c000e380 0007fa28 0000000d 00000001 000acc88 0000000d 00000000\n\t[   37.520294] 9fc0: 0007fa28 0000000d 000acc88 00000004 00000001 00000020 00000002 00000000\n\t[   37.528869] 9fe0: 00000000 beab8624 0000ea05 b6eaebac 600d0010 00000001 00000000 00000000\n\t[   37.537475] [\u003cc00b408c\u003e] (kfree+0x84/0x144) from [\u003cc0236274\u003e] (device_add+0x530/0x57c)\n\t[   37.545806] [\u003cc0236274\u003e] (device_add+0x530/0x57c) from [\u003cc032fa40\u003e] (iio_device_register+0x8c8/0x990)\n\t[   37.555480] [\u003cc032fa40\u003e] (iio_device_register+0x8c8/0x990) from [\u003cc0330164\u003e] (hmc5843_probe+0xec/0x114)\n\t[   37.565338] [\u003cc0330164\u003e] (hmc5843_probe+0xec/0x114) from [\u003cc02ccfd8\u003e] (i2c_device_probe+0xc4/0xf8)\n\t[   37.574737] [\u003cc02ccfd8\u003e] (i2c_device_probe+0xc4/0xf8) from [\u003cc02381a8\u003e] (driver_probe_device+0x118/0x218)\n\t[   37.584777] [\u003cc02381a8\u003e] (driver_probe_device+0x118/0x218) from [\u003cc0236bb0\u003e] (bus_for_each_drv+0x4c/0x84)\n\t[   37.594818] [\u003cc0236bb0\u003e] (bus_for_each_drv+0x4c/0x84) from [\u003cc0238030\u003e] (device_attach+0x78/0xa4)\n\t[   37.604125] [\u003cc0238030\u003e] (device_attach+0x78/0xa4) from [\u003cc02377ec\u003e] (bus_probe_device+0x28/0x9c)\n\t[   37.613433] [\u003cc02377ec\u003e] (bus_probe_device+0x28/0x9c) from [\u003cc0236138\u003e] (device_add+0x3f4/0x57c)\n\t[   37.622650] [\u003cc0236138\u003e] (device_add+0x3f4/0x57c) from [\u003cc02cd634\u003e] (i2c_new_device+0xf8/0x19c)\n\t[   37.631805] [\u003cc02cd634\u003e] (i2c_new_device+0xf8/0x19c) from [\u003cc02cd78c\u003e] (i2c_sysfs_new_device+0xb4/0x130)\n\t[   37.641754] [\u003cc02cd78c\u003e] (i2c_sysfs_new_device+0xb4/0x130) from [\u003cc0234d88\u003e] (dev_attr_store+0x18/0x24)\n\t[   37.651611] [\u003cc0234d88\u003e] (dev_attr_store+0x18/0x24) from [\u003cc010c354\u003e] (sysfs_write_file+0x10c/0x140)\n\t[   37.661193] [\u003cc010c354\u003e] (sysfs_write_file+0x10c/0x140) from [\u003cc00b7bf8\u003e] (vfs_write+0xb0/0x178)\n\t[   37.670410] [\u003cc00b7bf8\u003e] (vfs_write+0xb0/0x178) from [\u003cc00b7ed8\u003e] (sys_write+0x3c/0x68)\n\t[   37.678833] [\u003cc00b7ed8\u003e] (sys_write+0x3c/0x68) from [\u003cc000e380\u003e] (ret_fast_syscall+0x0/0x3c)\n\t[   37.687683] Code: 1593301c e5932000 e3120080 1a000000 (e7f001f2)\n\t[   37.700775] ---[ end trace aaf805debdb69390 ]---\n\nClient data was assigned to iio_dev structure in probe but in\nhmc5843_init_client function casted to private driver data structure which\nis wrong. Possibly calling mutex_init(\u0026data-\u003elock); corrupt data\nwhich the lead to above crash.\n\nSigned-off-by: Marek Belisko \u003cmarek.belisko@open-nandra.com\u003e\nCc: stable \u003cstable@vger.kernel.org\u003e\nAcked-by: Jonathan Cameron \u003cjic23@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "91dd3da70cb4961a9751c107bb9eb7565d48e3db",
      "old_mode": 33188,
      "old_path": "drivers/staging/iio/magnetometer/hmc5843.c",
      "new_id": "e00b416c4d331a428b1c7b8c0a799174fa96b33b",
      "new_mode": 33188,
      "new_path": "drivers/staging/iio/magnetometer/hmc5843.c"
    }
  ]
}
