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.19 15/16] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
Date: Sun, 9 Oct 2022 16:52:24 -0400 [thread overview]
Message-ID: <20221009205226.1202133-15-sashal@kernel.org> (raw)
In-Reply-To: <20221009205226.1202133-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 2acea7792bb2..6a0229c29ea4 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4001,7 +4001,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:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 20:52 [PATCH AUTOSEL 5.19 01/16] fs: dlm: fix race in lowcomms Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 02/16] rcu: Avoid triggering strict-GP irq-work when RCU is idle Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 03/16] rcu: Back off upon fill_page_cache_func() allocation failure Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 04/16] cpufreq: amd_pstate: fix wrong lowest perf fetch Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 05/16] ACPI: video: Add Toshiba Satellite/Portege Z830 quirk Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 06/16] fortify: Fix __compiletime_strlen() under UBSAN_BOUNDS_LOCAL Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 07/16] ACPI: tables: FPDT: Don't call acpi_os_map_memory() on invalid phys address Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 08/16] cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 09/16] MIPS: BCM47XX: Cast memcmp() of function to (void *) Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 10/16] powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 11/16] thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 12/16] ARM: decompressor: Include .data.rel.ro.local Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 13/16] ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable Sasha Levin
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 14/16] x86/entry: Work around Clang __bdos() bug Sasha Levin
2022-10-09 20:52 ` Sasha Levin [this message]
2022-10-09 20:52 ` [PATCH AUTOSEL 5.19 16/16] 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=20221009205226.1202133-15-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