diff options
| author | Shehjar Tikoo <shehjart@gluster.com> | 2011-01-13 03:38:51 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2011-01-13 09:46:51 -0800 | 
| commit | f2a067c4fe92f7aefc5f64ea1e5b000c16af0946 (patch) | |
| tree | 074b2a355e04ac0e1839171c09d8ac05e57c61ee /xlators/nfs/server/src | |
| parent | 5368b898fad7264405275adc2092859e3c87c14e (diff) | |
nfs3: Handle root resolution failuresv3.1.2
..to prevent a second reply to the client which results in accessing
a call state structure that gets freed on the first reply.
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2286 ([glusterfs 3.1.2qa3]: Crash due to corruption in gf_dirent_free)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2286
Diffstat (limited to 'xlators/nfs/server/src')
| -rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 05baee3aaeb..8697487945e 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -3116,11 +3116,7 @@ nfs3_fh_resolve_entry (nfs3_call_state_t *cs)          if (!cs)                  return ret; -        ret = nfs3_fh_resolve_entry_hard (cs); -        if (ret < 0) -		nfs3_call_resume_estale (cs); - -        return 0; +        return nfs3_fh_resolve_entry_hard (cs);  } @@ -3141,8 +3137,12 @@ nfs3_fh_resolve_resume (nfs3_call_state_t *cs)                  ret = nfs3_fh_resolve_entry (cs);  err_resume_call: -        if (ret < 0) +        if (ret < 0) { +                cs->resolve_ret = -1; +                cs->resolve_errno = EFAULT;                  nfs3_call_resume (cs); +                ret = 0; +        }          return ret;  } @@ -3162,11 +3162,11 @@ nfs3_fh_resolve_root_lookup_cbk (call_frame_t *frame, void *cookie,          cs->resolve_errno = op_errno;          if (op_ret == -1) { -                gf_log (GF_NFS3, GF_LOG_TRACE, "Lookup failed: %s: %s", -                        cs->resolvedloc.path, strerror (op_errno)); +                gf_log (GF_NFS3, GF_LOG_TRACE, "Root lookup failed: %s", +                        strerror (op_errno));                  goto err;          } else -                gf_log (GF_NFS3, GF_LOG_TRACE, "Entry looked up: %s", +                gf_log (GF_NFS3, GF_LOG_TRACE, "Root looked up: %s",                          cs->resolvedloc.path);          nfs3_set_root_looked_up (cs->nfs3state, &cs->resolvefh);  | 
