diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-09 13:55:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-09 13:55:37 -0400 |
commit | 68ebe3cbe786a954481d6ded0dc83f7d551640bf (patch) | |
tree | 14e2175c25b5ff70d04dc2dbc49655d754077b2e | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) | |
parent | e8fa33a6f6c7688591542db955794b69b8cecc55 (diff) |
Merge tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
"Hightlights include:
stable fixes:
- nfs/filelayout: fix oops when freeing filelayout segment
- NFS: Fix uninitialized rpc_wait_queue
bugfixes:
- NFSv4/pnfs: Fix an infinite layoutget loop
- nfs: RPC_MAX_AUTH_SIZE is in bytes"
* tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFSv4/pnfs: Fix an infinite layoutget loop
nfs/filelayout: fix oops when freeing filelayout segment
sunrpc: remove redundant initialization of sock
NFS: Fix uninitialized rpc_wait_queue
NFS: Cleanup error handling in nfs_idmap_request_key()
nfs: RPC_MAX_AUTH_SIZE is in bytes
-rw-r--r-- | fs/nfs/client.c | 2 | ||||
-rw-r--r-- | fs/nfs/filelayout/filelayout.c | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4idmap.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index efebe6cf4378..22880ef6d8dd 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -218,7 +218,6 @@ static void nfs_cb_idr_remove_locked(struct nfs_client *clp) | |||
218 | static void pnfs_init_server(struct nfs_server *server) | 218 | static void pnfs_init_server(struct nfs_server *server) |
219 | { | 219 | { |
220 | rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC"); | 220 | rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC"); |
221 | rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC"); | ||
222 | } | 221 | } |
223 | 222 | ||
224 | #else | 223 | #else |
@@ -888,6 +887,7 @@ struct nfs_server *nfs_alloc_server(void) | |||
888 | ida_init(&server->openowner_id); | 887 | ida_init(&server->openowner_id); |
889 | ida_init(&server->lockowner_id); | 888 | ida_init(&server->lockowner_id); |
890 | pnfs_init_server(server); | 889 | pnfs_init_server(server); |
890 | rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC"); | ||
891 | 891 | ||
892 | return server; | 892 | return server; |
893 | } | 893 | } |
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 44c638b7876c..508126eb49f9 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c | |||
@@ -745,7 +745,8 @@ filelayout_free_lseg(struct pnfs_layout_segment *lseg) | |||
745 | struct nfs4_filelayout_segment *fl = FILELAYOUT_LSEG(lseg); | 745 | struct nfs4_filelayout_segment *fl = FILELAYOUT_LSEG(lseg); |
746 | 746 | ||
747 | dprintk("--> %s\n", __func__); | 747 | dprintk("--> %s\n", __func__); |
748 | nfs4_fl_put_deviceid(fl->dsaddr); | 748 | if (fl->dsaddr != NULL) |
749 | nfs4_fl_put_deviceid(fl->dsaddr); | ||
749 | /* This assumes a single RW lseg */ | 750 | /* This assumes a single RW lseg */ |
750 | if (lseg->pls_range.iomode == IOMODE_RW) { | 751 | if (lseg->pls_range.iomode == IOMODE_RW) { |
751 | struct nfs4_filelayout *flo; | 752 | struct nfs4_filelayout *flo; |
diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c index dd5d27da8c0c..30426c1a1bbd 100644 --- a/fs/nfs/nfs4idmap.c +++ b/fs/nfs/nfs4idmap.c | |||
@@ -274,7 +274,7 @@ static struct key *nfs_idmap_request_key(const char *name, size_t namelen, | |||
274 | ssize_t ret; | 274 | ssize_t ret; |
275 | 275 | ||
276 | ret = nfs_idmap_get_desc(name, namelen, type, strlen(type), &desc); | 276 | ret = nfs_idmap_get_desc(name, namelen, type, strlen(type), &desc); |
277 | if (ret <= 0) | 277 | if (ret < 0) |
278 | return ERR_PTR(ret); | 278 | return ERR_PTR(ret); |
279 | 279 | ||
280 | rkey = request_key(&key_type_id_resolver, desc, ""); | 280 | rkey = request_key(&key_type_id_resolver, desc, ""); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6c61e2b99635..f90090e8c959 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -8399,8 +8399,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task, | |||
8399 | lo = NFS_I(inode)->layout; | 8399 | lo = NFS_I(inode)->layout; |
8400 | /* If the open stateid was bad, then recover it. */ | 8400 | /* If the open stateid was bad, then recover it. */ |
8401 | if (!lo || test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) || | 8401 | if (!lo || test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) || |
8402 | nfs4_stateid_match_other(&lgp->args.stateid, | 8402 | !nfs4_stateid_match_other(&lgp->args.stateid, &lo->plh_stateid)) { |
8403 | &lgp->args.ctx->state->stateid)) { | ||
8404 | spin_unlock(&inode->i_lock); | 8403 | spin_unlock(&inode->i_lock); |
8405 | exception->state = lgp->args.ctx->state; | 8404 | exception->state = lgp->args.ctx->state; |
8406 | exception->stateid = &lgp->args.stateid; | 8405 | exception->stateid = &lgp->args.stateid; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 37c8af003275..14ed9791ec9c 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1842,8 +1842,8 @@ static void encode_create_session(struct xdr_stream *xdr, | |||
1842 | * Assumes OPEN is the biggest non-idempotent compound. | 1842 | * Assumes OPEN is the biggest non-idempotent compound. |
1843 | * 2 is the verifier. | 1843 | * 2 is the verifier. |
1844 | */ | 1844 | */ |
1845 | max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + | 1845 | max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + 2) |
1846 | RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT; | 1846 | * XDR_UNIT + RPC_MAX_AUTH_SIZE; |
1847 | 1847 | ||
1848 | encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr); | 1848 | encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr); |
1849 | p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12); | 1849 | p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12); |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9b5de31aa429..c1841f234a71 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -2203,7 +2203,7 @@ static void xs_udp_setup_socket(struct work_struct *work) | |||
2203 | struct sock_xprt *transport = | 2203 | struct sock_xprt *transport = |
2204 | container_of(work, struct sock_xprt, connect_worker.work); | 2204 | container_of(work, struct sock_xprt, connect_worker.work); |
2205 | struct rpc_xprt *xprt = &transport->xprt; | 2205 | struct rpc_xprt *xprt = &transport->xprt; |
2206 | struct socket *sock = transport->sock; | 2206 | struct socket *sock; |
2207 | int status = -EIO; | 2207 | int status = -EIO; |
2208 | 2208 | ||
2209 | sock = xs_create_sock(xprt, transport, | 2209 | sock = xs_create_sock(xprt, transport, |