Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031612AbaGDWcC (ORCPT ); Fri, 4 Jul 2014 18:32:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57633 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760252AbaGDWWR (ORCPT ); Fri, 4 Jul 2014 18:22:17 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , "J. Bruce Fields" Subject: [PATCH 3.10 22/46] SUNRPC: Fix a module reference leak in svc_handle_xprt Date: Fri, 4 Jul 2014 15:19:26 -0700 Message-Id: <20140704221603.287982130@linuxfoundation.org> X-Mailer: git-send-email 2.0.1 In-Reply-To: <20140704221602.280733370@linuxfoundation.org> References: <20140704221602.280733370@linuxfoundation.org> User-Agent: quilt/0.63-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust commit c789102c20bbbdda6831a273e046715be9d6af79 upstream. If the accept() call fails, we need to put the module reference. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/svc_xprt.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -730,6 +730,8 @@ static int svc_handle_xprt(struct svc_rq 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", -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/