Skip to content

rpc: resolve softlockup in presence of iptables drop rule

Jason Baron linux-nfs 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 9 repliesSuperseded

Changes in v2 from the cover letter

-return -EIO after major timeout on a soft mount, continue to retry if its a hard mount
-fixup changelogs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rpc: return sent and err from xs_sendpages()net/sunrpc/xprtsock.c+42 -390 replies
2/2rpc: Add -EPERM processing for xs_udp_send_request()net/sunrpc/clnt.c net/sunrpc/xprtsock.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] rpc: resolve softlockup in presence of iptables drop rule

v2:
-return -EIO after major timeout on a soft mount, continue to retry if its a hard mount
-fixup changelogs

Hi,

We've found a softlockup on the nfsv3 client (udp), while testing an iptables rule, which simply drops traffic destined for the nfs server. The softlockup occurs because xs_sendpages() returns a positive result (resulting in an -EAGAIN), masking out the -EPERM that the lower level ip code returns.

The first patch restructures xs_sendpages() such that it can return a 'sent' value in addition to an error value. It no longer over-loads the return value as both a 'sent' and 'error' value. In this way the 'higher' level code can make more informed decisions.

The second patch makes use of the new return value to propagate an -EIO up instead of the -EAGAIN and avoids the cpu spinning.

Thanks,

-Jason

Jason Baron (2):
rpc: return sent and err from xs_sendpages()
rpc: Add -EPERM processing for xs_udp_send_request()

 net/sunrpc/clnt.c     |  2 ++
 net/sunrpc/xprtsock.c | 87 ++++++++++++++++++++++++++++-----------------------
 2 files changed, 50 insertions(+), 39 deletions(-)
Signature · 1 line
1.8.2.rc2