linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
To: linux-nfs <linux-nfs@vger.kernel.org>
Subject: internal error code leakage into user space
Date: Mon, 20 Oct 2025 19:54:37 +0200 (CEST)	[thread overview]
Message-ID: <707767179.31268962.1760982877695.JavaMail.zimbra@desy.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]


Hi NFS-people,

In f06bedfa62d5 I update updated the client to breaks the retry loop when application is interrupted.
Lately we have noticed, that on unmount during write, client leaks internal error code to the application,
for example:

`dd: failed to open 'file.1': Unknown error 512`

I think nfs4_map_errors function should map ERESTARTSYS to something that user-space is aware of. What should
be the appropriate error code, EIO? This is the fix that I am thinking of:


diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 411776718494..031881172a4b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -197,6 +197,7 @@ static int nfs4_map_errors(int err)
                return -ENOTSYNC;
        case -ENETDOWN:
        case -ENETUNREACH:
+       case -ERESTARTSYS:
                break;
        default:
                dprintk("%s could not handle NFSv4 error %d\n",


Best regards,
  Tigran.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2826 bytes --]

                 reply	other threads:[~2025-10-20 18:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=707767179.31268962.1760982877695.JavaMail.zimbra@desy.de \
    --to=tigran.mkrtchyan@desy.de \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).