Commit 6254d537 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'nfs-for-6.12-2' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client fixes from Anna Schumaker:
 "Localio Bugfixes:
   - remove duplicated include in localio.c
   - fix race in NFS calls to nfsd_file_put_local() and nfsd_serv_put()
   - fix Kconfig for NFS_COMMON_LOCALIO_SUPPORT
   - fix nfsd_file tracepoints to handle NULL rqstp pointers

  Other Bugfixes:
   - fix program selection loop in svc_process_common
   - fix integer overflow in decode_rc_list()
   - prevent NULL-pointer dereference in nfs42_complete_copies()
   - fix CB_RECALL performance issues when using a large number of
     delegations"

* tag 'nfs-for-6.12-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  NFS: remove revoked delegation from server's delegation list
  nfsd/localio: fix nfsd_file tracepoints to handle NULL rqstp
  nfs_common: fix Kconfig for NFS_COMMON_LOCALIO_SUPPORT
  nfs_common: fix race in NFS calls to nfsd_file_put_local() and nfsd_serv_put()
  NFSv4: Prevent NULL-pointer dereference in nfs42_complete_copies()
  SUNRPC: Fix integer overflow in decode_rc_list()
  sunrpc: fix prog selection loop in svc_process_common
  nfs: Remove duplicated include in localio.c
parents a1029768 7ef60108
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ config NFS_COMMON

config NFS_COMMON_LOCALIO_SUPPORT
	tristate
	default n
	depends on NFS_LOCALIO
	default y if NFSD=y || NFS_FS=y
	default m if NFSD=m && NFS_FS=m
	select SUNRPC
+2 −0
Original line number Diff line number Diff line
@@ -375,6 +375,8 @@ static __be32 decode_rc_list(struct xdr_stream *xdr,

	rc_list->rcl_nrefcalls = ntohl(*p++);
	if (rc_list->rcl_nrefcalls) {
		if (unlikely(rc_list->rcl_nrefcalls > xdr->buf->len))
			goto out;
		p = xdr_inline_decode(xdr,
			     rc_list->rcl_nrefcalls * 2 * sizeof(uint32_t));
		if (unlikely(p == NULL))
+1 −0
Original line number Diff line number Diff line
@@ -996,6 +996,7 @@ struct nfs_server *nfs_alloc_server(void)
	INIT_LIST_HEAD(&server->layouts);
	INIT_LIST_HEAD(&server->state_owners_lru);
	INIT_LIST_HEAD(&server->ss_copies);
	INIT_LIST_HEAD(&server->ss_src_copies);

	atomic_set(&server->active, 0);

+5 −0
Original line number Diff line number Diff line
@@ -1001,6 +1001,11 @@ void nfs_delegation_mark_returned(struct inode *inode,
	}

	nfs_mark_delegation_revoked(delegation);
	clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
	spin_unlock(&delegation->lock);
	if (nfs_detach_delegation(NFS_I(inode), delegation, NFS_SERVER(inode)))
		nfs_put_delegation(delegation);
	goto out_rcu_unlock;

out_clear_returning:
	clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
+3 −4
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include <net/addrconf.h>
#include <linux/nfs_common.h>
#include <linux/nfslocalio.h>
#include <linux/module.h>
#include <linux/bvec.h>

#include <linux/nfs.h>
@@ -341,7 +340,7 @@ nfs_local_pgio_release(struct nfs_local_kiocb *iocb)
{
	struct nfs_pgio_header *hdr = iocb->hdr;

	nfs_to->nfsd_file_put_local(iocb->localio);
	nfs_to_nfsd_file_put_local(iocb->localio);
	nfs_local_iocb_free(iocb);
	nfs_local_hdr_release(hdr, hdr->task.tk_ops);
}
@@ -622,7 +621,7 @@ int nfs_local_doio(struct nfs_client *clp, struct nfsd_file *localio,
	}
out:
	if (status != 0) {
		nfs_to->nfsd_file_put_local(localio);
		nfs_to_nfsd_file_put_local(localio);
		hdr->task.tk_status = status;
		nfs_local_hdr_release(hdr, call_ops);
	}
@@ -673,7 +672,7 @@ nfs_local_release_commit_data(struct nfsd_file *localio,
		struct nfs_commit_data *data,
		const struct rpc_call_ops *call_ops)
{
	nfs_to->nfsd_file_put_local(localio);
	nfs_to_nfsd_file_put_local(localio);
	call_ops->rpc_call_done(&data->task, data);
	call_ops->rpc_release(data);
}
Loading