From: Trond Myklebust <trondmy@hammerspace.com>
To: "usiegl00@gmail.com" <usiegl00@gmail.com>,
"neilb@suse.de" <neilb@suse.de>,
"davem@davemloft.net" <davem@davemloft.net>,
"Dai.Ngo@oracle.com" <Dai.Ngo@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
"jlayton@kernel.org" <jlayton@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"anna@kernel.org" <anna@kernel.org>,
"tom@talpey.com" <tom@talpey.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"kolga@netapp.com" <kolga@netapp.com>
Subject: Re: [PATCH] xprtsock: Fix a loop in xs_tcp_setup_socket()
Date: Sun, 21 Apr 2024 22:32:57 +0000 [thread overview]
Message-ID: <a1739c36a59617ebd01a7d3fe8f5a9f8ada771e5.camel@hammerspace.com> (raw)
In-Reply-To: <20240420104801.94701-1-usiegl00@gmail.com>
On Sat, 2024-04-20 at 19:48 +0900, Lex Siegel wrote:
> [You don't often get email from usiegl00@gmail.com. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> When using a bpf on kernel_connect(), the call can return -EPERM.
> This causes xs_tcp_setup_socket() to loop forever, filling up the
> syslog and causing the kernel to freeze up.
>
> Signed-off-by: Lex Siegel <usiegl00@gmail.com>
> ---
> net/sunrpc/xprtsock.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index bb9b747d58a1..47b254806a08 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -2446,6 +2446,8 @@ static void xs_tcp_setup_socket(struct
> work_struct *work)
> /* Happens, for instance, if the user specified a
> link
> * local IPv6 address without a scope-id.
> */
> + case -EPERM:
> + /* Happens, for instance, if a bpf is preventing the
> connect */
> case -ECONNREFUSED:
> case -ECONNRESET:
> case -ENETDOWN:
> --
> 2.39.3
>
This looks as if it will have some rather subtle interactions if the
RPC_TASK_SOFTCONN flag is set. Have you tested this kind of scenario?
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2024-04-21 22:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 10:48 [PATCH] xprtsock: Fix a loop in xs_tcp_setup_socket() Lex Siegel
2024-04-20 11:06 ` Jeff Layton
2024-04-21 22:32 ` Trond Myklebust [this message]
2024-04-21 23:22 ` NeilBrown
2024-04-22 3:32 ` Lex Siegel
2024-04-22 3:44 ` NeilBrown
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=a1739c36a59617ebd01a7d3fe8f5a9f8ada771e5.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jlayton@kernel.org \
--cc=kolga@netapp.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tom@talpey.com \
--cc=usiegl00@gmail.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