)]}'
{
  "commit": "3dedbb5ca10ef13f25055776d2f6d9499d9ca1ba",
  "tree": "20484da7a5b19d2e1afa5777a01fe608b5a89214",
  "parents": [
    "f279cd008fc9742f5ec294d9b8a793a7a0b163ef"
  ],
  "author": {
    "name": "Jason Baron",
    "email": "jbaron@akamai.com",
    "time": "Wed Sep 24 18:08:04 2014 +0000"
  },
  "committer": {
    "name": "Trond Myklebust",
    "email": "trond.myklebust@primarydata.com",
    "time": "Wed Sep 24 23:13:46 2014 -0400"
  },
  "message": "rpc: Add -EPERM processing for xs_udp_send_request()\n\nIf an iptables drop rule is added for an nfs server, the client can end up in\na softlockup. Because of the way that xs_sendpages() is structured, the -EPERM\nis ignored since the prior bits of the packet may have been successfully queued\nand thus xs_sendpages() returns a non-zero value. Then, xs_udp_send_request()\nthinks that because some bits were queued it should return -EAGAIN. We then try\nthe request again and again, resulting in cpu spinning. Reproducer:\n\n1) open a file on the nfs server \u0027/nfs/foo\u0027 (mounted using udp)\n2) iptables -A OUTPUT -d \u003cnfs server ip\u003e -j DROP\n3) write to /nfs/foo\n4) close /nfs/foo\n5) iptables -D OUTPUT -d \u003cnfs server ip\u003e -j DROP\n\nThe softlockup occurs in step 4 above.\n\nThe previous patch, allows xs_sendpages() to return both a sent count and\nany error values that may have occurred. Thus, if we get an -EPERM, return\nthat to the higher level code.\n\nWith this patch in place we can successfully abort the above sequence and\navoid the softlockup.\n\nI also tried the above test case on an nfs mount on tcp and although the system\ndoes not softlockup, I still ended up with the \u0027hung_task\u0027 firing after 120\nseconds, due to the i/o being stuck. The tcp case appears a bit harder to fix,\nsince -EPERM appears to get ignored much lower down in the stack and does not\npropogate up to xs_sendpages(). This case is not quite as insidious as the\nsoftlockup and it is not addressed here.\n\nReported-by: Yigong Lou \u003cylou@akamai.com\u003e\nSigned-off-by: Jason Baron \u003cjbaron@akamai.com\u003e\nSigned-off-by: Trond Myklebust \u003ctrond.myklebust@primarydata.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "488ddeed9363db71e1b5a80df4863a464345cb20",
      "old_mode": 33188,
      "old_path": "net/sunrpc/clnt.c",
      "new_id": "c4c60697589aee435b7249f8b043398f96fb2200",
      "new_mode": 33188,
      "new_path": "net/sunrpc/clnt.c"
    },
    {
      "type": "modify",
      "old_id": "7d9ea6b7113df562a9ca6502dae58ba2aed8c2b0",
      "old_mode": 33188,
      "old_path": "net/sunrpc/xprtsock.c",
      "new_id": "02603ec2460a8f801935ac53f56dafd1c0424304",
      "new_mode": 33188,
      "new_path": "net/sunrpc/xprtsock.c"
    }
  ]
}
