diff options
Diffstat (limited to 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nfs3.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c index 729f811c917..6399d624ff8 100644 --- a/xlators/nfs/server/src/nfs3.c +++ b/xlators/nfs/server/src/nfs3.c @@ -862,6 +862,12 @@ nfs3svc_getattr_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, cs = frame->local; if (op_ret == -1) { + /* Prevent crashes for the case where this call fails + * and buf is left in a NULL state, yet the op_errno == 0. + */ + if (!buf && op_errno == 0) { + op_errno = EIO; + } status = nfs3_cbk_errno_status (op_ret, op_errno); } |