Project

General

Profile

Actions

Bug #5557

closed

rfs3_lookup() could return invalid error

Added by Marcel Telka over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
nfs - NFS server and client
Start date:
2015-01-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

Here in rfs3_lookup() we are trying to fail with NFS3ERR_ACCES:

495                VN_RELE(vp);
496                resp->status = NFS3ERR_ACCES;
497                error = 1;

...

505    if (error)
506        goto out;

...

553out:
554    if (curthread->t_flag & T_WOULDBLOCK) {
555        curthread->t_flag &= ~T_WOULDBLOCK;
556        resp->status = NFS3ERR_JUKEBOX;
557    } else
558        resp->status = puterrno3(error);

but at line 558 the resp->status will be changed to NFS3ERR_PERM (via puterrno3) because EPERM is defined as 1. According to RFC 1813 the proper error returned here should be NFS3ERR_ACCES.

Actions

Also available in: Atom PDF