Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfsd-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fixes from Chuck Lever:

- Address a slow memory leak with RPC-over-TCP

- Prevent another NFS4ERR_DELAY loop during CREATE_SESSION

* tag 'nfsd-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
nfsd: hold a lighter-weight client reference over CB_RECALL_ANY
SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP

+3 -14
+2 -5
fs/nfsd/nfs4state.c
··· 3042 3042 nfsd4_cb_recall_any_release(struct nfsd4_callback *cb) 3043 3043 { 3044 3044 struct nfs4_client *clp = cb->cb_clp; 3045 - struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); 3046 3045 3047 - spin_lock(&nn->client_lock); 3048 3046 clear_bit(NFSD4_CLIENT_CB_RECALL_ANY, &clp->cl_flags); 3049 - put_client_renew_locked(clp); 3050 - spin_unlock(&nn->client_lock); 3047 + drop_client(clp); 3051 3048 } 3052 3049 3053 3050 static int ··· 6613 6616 list_add(&clp->cl_ra_cblist, &cblist); 6614 6617 6615 6618 /* release in nfsd4_cb_recall_any_release */ 6616 - atomic_inc(&clp->cl_rpc_users); 6619 + kref_get(&clp->cl_nfsdfs.cl_ref); 6617 6620 set_bit(NFSD4_CLIENT_CB_RECALL_ANY, &clp->cl_flags); 6618 6621 clp->cl_ra_time = ktime_get_boottime_seconds(); 6619 6622 }
+1 -9
net/sunrpc/svcsock.c
··· 1206 1206 * MSG_SPLICE_PAGES is used exclusively to reduce the number of 1207 1207 * copy operations in this path. Therefore the caller must ensure 1208 1208 * that the pages backing @xdr are unchanging. 1209 - * 1210 - * Note that the send is non-blocking. The caller has incremented 1211 - * the reference count on each page backing the RPC message, and 1212 - * the network layer will "put" these pages when transmission is 1213 - * complete. 1214 - * 1215 - * This is safe for our RPC services because the memory backing 1216 - * the head and tail components is never kmalloc'd. These always 1217 - * come from pages in the svc_rqst::rq_pages array. 1218 1209 */ 1219 1210 static int svc_tcp_sendmsg(struct svc_sock *svsk, struct svc_rqst *rqstp, 1220 1211 rpc_fraghdr marker, unsigned int *sentp) ··· 1235 1244 iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec, 1236 1245 1 + count, sizeof(marker) + rqstp->rq_res.len); 1237 1246 ret = sock_sendmsg(svsk->sk_sock, &msg); 1247 + page_frag_free(buf); 1238 1248 if (ret < 0) 1239 1249 return ret; 1240 1250 *sentp += ret;