From: Chuck Lever <chuck.lever@oracle.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>,
Olga Kornievskaia <kolga@netapp.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
kernel@pengutronix.de, patchwork-lst@pengutronix.de
Subject: Re: [PATCH] SUNRPC: use request size to initialize bio_vec in svc_udp_sendto()
Date: Wed, 17 Jan 2024 17:03:06 -0500 [thread overview]
Message-ID: <ZahOmmMZxHcK8Amn@tissot.1015granger.net> (raw)
In-Reply-To: <20240117210628.1534046-1-l.stach@pengutronix.de>
On Wed, Jan 17, 2024 at 10:06:28PM +0100, Lucas Stach wrote:
> Use the proper size when setting up the bio_vec, as otherwise only
> zero-length UDP packets will be sent.
>
> Fixes: baabf59c2414 ("SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array")
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> net/sunrpc/svcsock.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
> index 998687421fa6..e0ce4276274b 100644
> --- a/net/sunrpc/svcsock.c
> +++ b/net/sunrpc/svcsock.c
> @@ -717,12 +717,12 @@ static int svc_udp_sendto(struct svc_rqst *rqstp)
> ARRAY_SIZE(rqstp->rq_bvec), xdr);
>
> iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
> - count, 0);
> + count, rqstp->rq_res.len);
> err = sock_sendmsg(svsk->sk_sock, &msg);
> if (err == -ECONNREFUSED) {
> /* ICMP error on earlier request. */
> iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
> - count, 0);
> + count, rqstp->rq_res.len);
> err = sock_sendmsg(svsk->sk_sock, &msg);
> }
>
> --
> 2.43.0
>
I can't fathom why I would have chosen zero for the @count argument.
We currently have zero test coverage for UDP. I'll look into that.
I've applied this to the nfsd-fixes branch. It should appear in
v6.8-rc if I can get it tested.
--
Chuck Lever
next prev parent reply other threads:[~2024-01-17 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 21:06 [PATCH] SUNRPC: use request size to initialize bio_vec in svc_udp_sendto() Lucas Stach
2024-01-17 22:03 ` Chuck Lever [this message]
2024-01-18 8:42 ` Lucas Stach
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=ZahOmmMZxHcK8Amn@tissot.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=jlayton@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kolga@netapp.com \
--cc=l.stach@pengutronix.de \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=patchwork-lst@pengutronix.de \
--cc=tom@talpey.com \
--cc=trond.myklebust@hammerspace.com \
/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;
as well as URLs for NNTP newsgroup(s).