Skip to contentSkip to conversation

Patch "NFS: Fix uninitialized rpc_wait_queue" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 15, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

NFS: Fix uninitialized rpc_wait_queue

to the 4.13-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:
nfs-fix-uninitialized-rpc_wait_queue.patch
and it can be found in the queue-4.13 subdirectory.

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

Quoted 1 line

From 68ebf8fe3bce8c167cf83fbd681c1eb1ed419c6c Mon Sep 17 00:00:00 2001

From: Benjamin Coddington <[email protected]>
Date: Fri, 22 Sep 2017 07:57:10 -0400
Subject: NFS: Fix uninitialized rpc_wait_queue

From: Benjamin Coddington <[email protected]>

commit 68ebf8fe3bce8c167cf83fbd681c1eb1ed419c6c upstream.

Michael Sterrett reports a NULL pointer dereference on NFSv3 mounts when CONFIG_NFS_V4 is not set because the NFS UOC rpc_wait_queue has not been initialized. Move the initialization of the queue out of the CONFIG_NFS_V4 conditional setion.

Fixes 7d6ddf88c4db ("NFS: Add an iocounter wait function for async RPC tasks")
---
 fs/nfs/client.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/client.c +1 -1
@@ -218,7 +218,6 @@ static void nfs_cb_idr_remove_locked(str
 static void pnfs_init_server(struct nfs_server *server)
 {
 	rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC");
-	rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC");
 }
 
 #else
@@ -888,6 +887,7 @@ struct nfs_server *nfs_alloc_server(void
 	ida_init(&server->openowner_id);
 	ida_init(&server->lockowner_id);
 	pnfs_init_server(server);
+	rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC");
 
 	return server;
 }

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

queue-4.13/nfs-fix-uninitialized-rpc_wait_queue.patch