[packages/kernel/LINUX_3_7] pull essential nfs fixes from stable-queue, release 2.

pluto pluto at pld-linux.org
Sun Mar 3 11:31:16 CET 2013


commit af554b149aaf79478de684a7b799e69a8cea6b2f
Author: Paweł Sikora <pawel.sikora at agmk.net>
Date:   Sun Mar 3 11:30:29 2013 +0100

    pull essential nfs fixes from stable-queue, release 2.

 kernel-small_fixes.patch | 96 ++++++++++++++++++++++++++++++++++++++++++++++++
 kernel.spec              |  2 +-
 2 files changed, 97 insertions(+), 1 deletion(-)
---
diff --git a/kernel.spec b/kernel.spec
index 945c207..5813ba1 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -66,7 +66,7 @@
 %define		have_pcmcia	0
 %endif
 
-%define		rel		1
+%define		rel		2
 %define		basever		3.7
 %define		postver		.10
 
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index dea54c0..95b9948 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -699,3 +699,99 @@ index c7851c0..6f6534e 100644
  		ret = regulator_is_supported_voltage(host->vmmc, 3300000,
  			3300000);
  		if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
+From 2d32b29a1c2830f7c42caa8258c714acd983961f Mon Sep 17 00:00:00 2001
+From: majianpeng <majianpeng at gmail.com>
+Date: Tue, 29 Jan 2013 13:16:06 +0800
+Subject: nfsd: Fix memleak
+
+From: majianpeng <majianpeng at gmail.com>
+
+commit 2d32b29a1c2830f7c42caa8258c714acd983961f upstream.
+
+When free nfs-client, it must free the ->cl_stateids.
+
+Signed-off-by: Jianpeng Ma <majianpeng at gmail.com>
+Signed-off-by: J. Bruce Fields <bfields at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/nfsd/nfs4state.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -1053,6 +1053,8 @@ free_client(struct nfs4_client *clp)
+ 		put_group_info(clp->cl_cred.cr_group_info);
+ 	kfree(clp->cl_principal);
+ 	kfree(clp->cl_name.data);
++	idr_remove_all(&clp->cl_stateids);
++	idr_destroy(&clp->cl_stateids);
+ 	kfree(clp);
+ }
+ 
+From e75bafbff2270993926abcc31358361db74a9bc2 Mon Sep 17 00:00:00 2001
+From: "J. Bruce Fields" <bfields at redhat.com>
+Date: Sun, 10 Feb 2013 11:33:48 -0500
+Subject: svcrpc: make svc_age_temp_xprts enqueue under sv_lock
+
+From: "J. Bruce Fields" <bfields at redhat.com>
+
+commit e75bafbff2270993926abcc31358361db74a9bc2 upstream.
+
+svc_age_temp_xprts expires xprts in a two-step process: first it takes
+the sv_lock and moves the xprts to expire off their server-wide list
+(sv_tempsocks or sv_permsocks) to a local list.  Then it drops the
+sv_lock and enqueues and puts each one.
+
+I see no reason for this: svc_xprt_enqueue() will take sp_lock, but the
+sv_lock and sp_lock are not otherwise nested anywhere (and documentation
+at the top of this file claims it's correct to nest these with sp_lock
+inside.)
+
+Tested-by: Jason Tibbitts <tibbs at math.uh.edu>
+Tested-by: Paweł Sikora <pawel.sikora at agmk.net>
+Signed-off-by: J. Bruce Fields <bfields at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ net/sunrpc/svc_xprt.c |   15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+--- a/net/sunrpc/svc_xprt.c
++++ b/net/sunrpc/svc_xprt.c
+@@ -817,7 +817,6 @@ static void svc_age_temp_xprts(unsigned
+ 	struct svc_serv *serv = (struct svc_serv *)closure;
+ 	struct svc_xprt *xprt;
+ 	struct list_head *le, *next;
+-	LIST_HEAD(to_be_aged);
+ 
+ 	dprintk("svc_age_temp_xprts\n");
+ 
+@@ -838,25 +837,15 @@ static void svc_age_temp_xprts(unsigned
+ 		if (atomic_read(&xprt->xpt_ref.refcount) > 1 ||
+ 		    test_bit(XPT_BUSY, &xprt->xpt_flags))
+ 			continue;
+-		svc_xprt_get(xprt);
+-		list_move(le, &to_be_aged);
++		list_del_init(le);
+ 		set_bit(XPT_CLOSE, &xprt->xpt_flags);
+ 		set_bit(XPT_DETACHED, &xprt->xpt_flags);
+-	}
+-	spin_unlock_bh(&serv->sv_lock);
+-
+-	while (!list_empty(&to_be_aged)) {
+-		le = to_be_aged.next;
+-		/* fiddling the xpt_list node is safe 'cos we're XPT_DETACHED */
+-		list_del_init(le);
+-		xprt = list_entry(le, struct svc_xprt, xpt_list);
+-
+ 		dprintk("queuing xprt %p for closing\n", xprt);
+ 
+ 		/* a thread will dequeue and close it soon */
+ 		svc_xprt_enqueue(xprt);
+-		svc_xprt_put(xprt);
+ 	}
++	spin_unlock_bh(&serv->sv_lock);
+ 
+ 	mod_timer(&serv->sv_temptimer, jiffies + svc_conn_age_period * HZ);
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/af554b149aaf79478de684a7b799e69a8cea6b2f



More information about the pld-cvs-commit mailing list