diff options
author | Niels de Vos <ndevos@redhat.com> | 2017-01-13 14:02:45 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2017-06-16 09:56:52 +0000 |
commit | 9701e19fb6103b5c3d5ad38a1995c3f8f184e3a6 (patch) | |
tree | 26b78325231234599c34d10667a6a5998c3b025f /xlators | |
parent | f11ef6869d7fbe6ba91297ed814593b909da9c88 (diff) |
nfs/nlm: ignore notify when there is no matching rpc request
In certain (unclear) occasions it seems to happen that there are
notifications sent to the Gluster/NFS NLM service, but no call-state can
be found. Instead of segfaulting, log an error but keep on running.
Cherry picked from commit e997d752ba08f80b1b00d2c0035874befafe5200:
> Change-Id: I0f186e56e46a86ca40314d230c1cc7719c61f0b5
> BUG: 1381970
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: https://review.gluster.org/17185
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: soumya k <skoduri@redhat.com>
> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Change-Id: I0f186e56e46a86ca40314d230c1cc7719c61f0b5
BUG: 1450380
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17275
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/server/src/nlm4.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index 1675116c461..0e4a4d824fa 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -923,10 +923,16 @@ nlm_rpcclnt_notify (struct rpc_clnt *rpc_clnt, void *mydata, nfs3_call_state_t *cs = NULL; cs = mydata; - caller_name = cs->args.nlm4_lockargs.alock.caller_name; switch (fn) { case RPC_CLNT_CONNECT: + if (!cs->req) { + gf_msg (GF_NLM, GF_LOG_ERROR, EINVAL, + NFS_MSG_RPC_CLNT_ERROR, "Spurious notify?!"); + goto err; + } + + caller_name = cs->args.nlm4_lockargs.alock.caller_name; ret = nlm_set_rpc_clnt (rpc_clnt, caller_name); if (ret == -1) { gf_msg (GF_NLM, GF_LOG_ERROR, 0, |