)]}'
{
  "commit": "2a24bb28a315ea2579fbf13a99a69a10cf4c085e",
  "tree": "b074103ae3391419236ae1a91beb4f604c1bdcaa",
  "parents": [
    "0abcc6df070687816b0ca0aefc3d64c62773063c"
  ],
  "author": {
    "name": "Jon Hunter",
    "email": "jonathanh@nvidia.com",
    "time": "Fri Oct 09 14:49:59 2015 +0100"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Sat Oct 17 21:07:57 2015 -0700"
  },
  "message": "serial: tegra: Handle another RX race condition\n\nCommit 853a699739fe (\"serial: tegra: handle race condition on uart rx\nside\") attempted to fix a race condition between the RX end of\ntransmission interrupt and RX DMA completion callback. Despite this\nfix there is still another case where these two paths can race and\nresult in duplicated data. The race condition is as follows:\n\n1. DMA completion interrupt occurs and schedules tasklet to call DMA\n   callback.\n2. DMA callback for the UART driver starts to execute. This will copy\n   the data from the DMA buffer and restart the DMA. This is done under\n   uart port spinlock.\n3. During the callback, UART interrupt is raised for end of receive. The\n   UART ISR runs and waits to acquire port spinlock held by the DMA\n   callback.\n4. DMA callback gives up spinlock after copying the data, but before\n   restarting DMA.\n5. UART ISR acquires the spin lock and reads the same DMA buffer because\n   DMA has not been restarted yet.\n\nThe release of the spinlock during the DMA callback was introduced by\ncommit 9b88748b362c (\"tty: serial: tegra: drop uart_port-\u003elock before\ncalling tty_flip_buffer_push()\") to fix a spinlock lock-up issue when\ncalling tty_flip_buffer_push(). However, since then commit a9c3f68f3cd8\n(\"tty: Fix low_latency BUG\") migrated tty_flip_buffer_push() to always\nuse a workqueue, allowing tty_flip_buffer_push() to be called from\nwithin atomic sections. Therefore, we can remove the unlocking of the\nspinlock from the DMA callback and UART ISR and this will ensure that\nthe race condition no longer occurs.\n\nReported-by: Christopher Freeman \u003ccfreeman@nvidia.com\u003e\nSigned-off-by: Jon Hunter \u003cjonathanh@nvidia.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cf0133ae762dcd68d05fb834a2f481891b06e3dc",
      "old_mode": 33188,
      "old_path": "drivers/tty/serial/serial-tegra.c",
      "new_id": "38b49f447bd797c63d41e50dddf8bb9afaee93eb",
      "new_mode": 33188,
      "new_path": "drivers/tty/serial/serial-tegra.c"
    }
  ]
}
