)]}'
{
  "commit": "0851133bb5ad9d95fceccac9fc67b798041b73e2",
  "tree": "d595058108186c8731b361f53bad30c0f75fb5ee",
  "parents": [
    "80ec396cb6b522b23c69dfff32a2d12993e4bb30"
  ],
  "author": {
    "name": "Claudiu Manoil",
    "email": "claudiu.manoil@freescale.com",
    "time": "Mon Feb 24 12:13:45 2014 +0200"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Mon Feb 24 19:38:20 2014 -0500"
  },
  "message": "gianfar: Fix device reset races (oops) for Tx\n\nThe device reset procedure, stop_gfar()/startup_gfar(), has\nconcurrency issues.\n\"Kernel access of bad area\" oopses show up during Tx timeout\ndevice reset or other reset cases (like changing MTU) that\nhappen while the interface still has traffic. The oopses\nhappen in start_xmit and clean_tx_ring when accessing tx_queue-\u003e\ntx_skbuff which is NULL. The race comes from de-allocating the\ntx_skbuff while transmission and napi processing are still\nactive. Though the Tx queues get temoprarily stopped when Tx\ntimeout occurs, they get re-enabled as a result of Tx congestion\nhandling inside the napi context (see clean_tx_ring()). Not\ndisabling the napi during reset is also a bug, because\nclean_tx_ring() will try to access tx_skbuff while it is being\nde-alloc\u0027ed and re-alloc\u0027ed.\n\nTo fix this, stop_gfar() needs to disable napi processing\nafter stopping the Tx queues. However, in order to prevent\nclean_tx_ring() to re-enable the Tx queue before the napi\ngets disabled, the device state DOWN has been introduced.\nIt prevents the Tx congestion management from re-enabling the\nde-congested Tx queue while the device is brought down.\nAn additional locking state, RESETTING, has been introduced\nto prevent simultaneous resets or to prevent configuring the\ndevice while it is resetting.\nThe bogus \u0027rxlock\u0027s (for each Rx queue) have been removed since\ntheir purpose is not justified, as they don\u0027t prevent nor are\nsuited to prevent device reset/reconfig races (such as this one).\n\nSigned-off-by: Claudiu Manoil \u003cclaudiu.manoil@freescale.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6c054b549fa1bddd2fdb6176c80196b53fc7a34b",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/gianfar.c",
      "new_id": "4eac25f66605fecd24408a71f6411516b0f115fc",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/gianfar.c"
    },
    {
      "type": "modify",
      "old_id": "9db95563f8aa3b587a3ed74772d555f9a01ed094",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/gianfar.h",
      "new_id": "1e16216d4150e33a249c52ab4c66b277eb79338a",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/gianfar.h"
    },
    {
      "type": "modify",
      "old_id": "dd7ccec506f1a1803c537a0a2b627b8bc1828511",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/gianfar_ethtool.c",
      "new_id": "45219d4d09b412be287895a37df7c3c87b2ad96e",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/gianfar_ethtool.c"
    }
  ]
}
