Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: bfields@redhat.com, gregkh@linuxfoundation.org, trondmy@primarydata.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "SUNRPC: fix xprt leak on xps allocation failure" has been added to the 4.6-stable tree
Date: Mon, 11 Jul 2016 16:39:11 -0700	[thread overview]
Message-ID: <146828035114220@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    SUNRPC: fix xprt leak on xps allocation failure

to the 4.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sunrpc-fix-xprt-leak-on-xps-allocation-failure.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 1208fd569c07ab84aa5d024abd863267c2953b4a Mon Sep 17 00:00:00 2001
From: "J. Bruce Fields" <bfields@redhat.com>
Date: Fri, 20 May 2016 17:07:17 -0400
Subject: SUNRPC: fix xprt leak on xps allocation failure

From: J. Bruce Fields <bfields@redhat.com>

commit 1208fd569c07ab84aa5d024abd863267c2953b4a upstream.

Callers of rpc_create_xprt expect it to put the xprt on success and
failure.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Trond Myklebust <trondmy@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/sunrpc/clnt.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -453,9 +453,10 @@ static struct rpc_clnt *rpc_create_xprt(
 	struct rpc_xprt_switch *xps;
 
 	xps = xprt_switch_alloc(xprt, GFP_KERNEL);
-	if (xps == NULL)
+	if (xps == NULL) {
+		xprt_put(xprt);
 		return ERR_PTR(-ENOMEM);
-
+	}
 	clnt = rpc_new_client(args, xps, xprt, NULL);
 	if (IS_ERR(clnt))
 		return clnt;


Patches currently in stable-queue which might be from bfields@redhat.com are

queue-4.6/nfsd-check-permissions-when-setting-acls.patch
queue-4.6/nfsd-always-lock-state-exclusively.patch
queue-4.6/rpc-share-one-xps-between-all-backchannels.patch
queue-4.6/nfsd-extend-the-mutex-holding-region-around-in-nfsd4_process_open2.patch
queue-4.6/nfsd4-rpc-move-backchannel-create-logic-into-rpc-code.patch
queue-4.6/sunrpc-fix-xprt-leak-on-xps-allocation-failure.patch

                 reply	other threads:[~2016-07-12  2:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146828035114220@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bfields@redhat.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=trondmy@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox