From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>,
Chuck Lever <chuck.lever@oracle.com>,
Sasha Levin <sashal@kernel.org>,
jlayton@kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 09/10] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
Date: Sun, 9 Oct 2022 16:53:48 -0400 [thread overview]
Message-ID: <20221009205350.1203176-9-sashal@kernel.org> (raw)
In-Reply-To: <20221009205350.1203176-1-sashal@kernel.org>
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
[ Upstream commit 06981d560606ac48d61e5f4fff6738b925c93173 ]
This was discussed with Chuck as part of this patch set. Returning
nfserr_resource was decided to not be the best error message here, and
he suggested changing to nfserr_serverfault instead.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Link: https://lore.kernel.org/linux-nfs/20220907195259.926736-1-anna@kernel.org/T/#t
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfsd/nfs4xdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 46f825cf53f4..cc605ee0b2fa 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3871,7 +3871,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
if (resp->xdr.buf->page_len &&
test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags)) {
WARN_ON_ONCE(1);
- return nfserr_resource;
+ return nfserr_serverfault;
}
xdr_commit_encode(xdr);
--
2.35.1
next prev parent reply other threads:[~2022-10-09 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 20:53 [PATCH AUTOSEL 5.10 01/10] rcu: Back off upon fill_page_cache_func() allocation failure Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 02/10] rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE() Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 03/10] ACPI: video: Add Toshiba Satellite/Portege Z830 quirk Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 04/10] MIPS: BCM47XX: Cast memcmp() of function to (void *) Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 05/10] powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 06/10] thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash Sasha Levin
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 07/10] ARM: decompressor: Include .data.rel.ro.local Sasha Levin
2022-10-11 11:49 ` Pavel Machek
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 08/10] x86/entry: Work around Clang __bdos() bug Sasha Levin
2022-10-09 20:53 ` Sasha Levin [this message]
2022-10-09 20:53 ` [PATCH AUTOSEL 5.10 10/10] NFSD: fix use-after-free on source server when doing inter-server copy Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221009205350.1203176-9-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Anna.Schumaker@Netapp.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox