linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* internal error code leakage into user space
@ 2025-10-20 17:54 Mkrtchyan, Tigran
  0 siblings, 0 replies; only message in thread
From: Mkrtchyan, Tigran @ 2025-10-20 17:54 UTC (permalink / raw)
  To: linux-nfs

[-- 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 --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-20 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 17:54 internal error code leakage into user space Mkrtchyan, Tigran

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).