diff options
author | Santosh Kumar Pradhan <spradhan@redhat.com> | 2014-01-03 10:32:16 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-01-03 22:15:01 -0800 |
commit | 311e3868bfdb3f2c1535d5a7cb8f759195457612 (patch) | |
tree | fff3084fb2b451fd9dfa44ab5282c2dd82dd1993 /rpc/rpc-lib/src | |
parent | 8ee2420266a0a1c47fcfee0796ef08d93d0797ab (diff) |
gNFS: Possible SEGV crash in NFS while DRC is OFF
In rpcsvc_submit_generic(), FILE: rpc/rpc-lib/src/rpcsvc.c, while caching
the reply (DRC), the code does not check if DRC is ON and goes ahead
assuming DRC is on and try to take a LOCK on drc.
FIX: Put a check on svc->drc by rpcsvc_need_drc().
Change-Id: I52c57280487e6061c68fd0b784e1cafceb2f3690
BUG: 1048072
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6632
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 037c157f21e..d19a3ca0c3b 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1183,7 +1183,7 @@ rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec *proghdr, iobref_add (iobref, replyiob); /* cache the request in the duplicate request cache for appropriate ops */ - if (req->reply) { + if ((req->reply) && (rpcsvc_need_drc (req))) { drc = req->svc->drc; LOCK (&drc->lock); |