Skip to contentSkip to conversation

internal error code leakage into user space

PATCH Mkrtchyan, Tigran 1 participant 1 message Oct 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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:

fs/nfs/nfs4proc.c +1 -0
index 411776718494..031881172a4b 100644
@@ -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.