diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-05-18 14:05:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-06 18:57:27 -0700 |
commit | 7c3214d5c80afffb7b586d29033393a09ea65b73 (patch) | |
tree | 2f6c4ffb270c09962f269c1698d1f3a23dbcfa40 /net/sunrpc | |
parent | e8b367ff328464347cb5b8eb7d80467df32fe2af (diff) | |
download | kernel-common-7c3214d5c80afffb7b586d29033393a09ea65b73.tar.gz kernel-common-7c3214d5c80afffb7b586d29033393a09ea65b73.tar.bz2 kernel-common-7c3214d5c80afffb7b586d29033393a09ea65b73.zip |
SUNRPC: Fix a module reference leak in svc_handle_xprt
commit c789102c20bbbdda6831a273e046715be9d6af79 upstream.
If the accept() call fails, we need to put the module reference.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 06c6ff0cb911..a4acaf2bcf18 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -730,6 +730,8 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt) newxpt = xprt->xpt_ops->xpo_accept(xprt); if (newxpt) svc_add_new_temp_xprt(serv, newxpt); + else + module_put(xprt->xpt_class->xcl_owner); } else if (xprt->xpt_ops->xpo_has_wspace(xprt)) { /* XPT_DATA|XPT_DEFERRED case: */ dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n", |