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

    nfsd: pass proper net to nfsd_destroy() from NFSd kthreads

to the 3.4-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:
     nfsd-pass-proper-net-to-nfsd_destroy-from-nfsd-kthreads.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 88c47666171989ed4c5b1a5687df09511e8c5e35 Mon Sep 17 00:00:00 2001
From: Stanislav Kinsbursky <[email protected]>
Date: Thu, 6 Dec 2012 18:34:42 +0300
Subject: nfsd: pass proper net to nfsd_destroy() from NFSd kthreads

From: Stanislav Kinsbursky <[email protected]>

commit 88c47666171989ed4c5b1a5687df09511e8c5e35 upstream.

Since NFSd service is per-net now, we have to pass proper network
context in nfsd_shutdown() from NFSd kthreads.

The simplest way I found is to get proper net from one of transports
with permanent sockets.

Signed-off-by: Stanislav Kinsbursky <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
[wengmeiling: backport to 3.4: adjust context]
Signed-off-by: Weng Meiling <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 fs/nfsd/nfssvc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -483,6 +483,8 @@ static int
 nfsd(void *vrqstp)
 {
        struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp;
+       struct svc_xprt *perm_sock = 
list_entry(rqstp->rq_server->sv_permsocks.next, typeof(struct svc_xprt), 
xpt_list);
+       struct net *net = perm_sock->xpt_net;
        int err, preverr = 0;
 
        /* Lock module and set up kernel thread */
@@ -557,7 +559,7 @@ out:
        /* Release the thread */
        svc_exit_thread(rqstp);
 
-       nfsd_destroy(&init_net);
+       nfsd_destroy(net);
 
        /* Release module */
        mutex_unlock(&nfsd_mutex);


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.4/nfsd-pass-net-to-nfsd_svc.patch
queue-3.4/nfsd-pass-proper-net-to-nfsd_destroy-from-nfsd-kthreads.patch
queue-3.4/nfsd-pass-net-to-nfsd_init_socks.patch
queue-3.4/nfsd-pass-net-to-__write_ports-and-down.patch
queue-3.4/nfsd-pass-net-to-nfsd_set_nrthreads.patch
queue-3.4/nfsd-pass-net-to-nfsd_create_serv.patch
queue-3.4/nfsd-pass-net-to-nfsd_startup-and-nfsd_shutdown.patch
queue-3.4/nfsd-containerize-nfsd-filesystem.patch
queue-3.4/nfsd-check-passed-socket-s-net-matches-nfsd-superblock-s-one.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to