All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: "kernel-tls-handshake@lists.linux.dev"
	<kernel-tls-handshake@lists.linux.dev>
Subject: Re: [PATCH] handshake: set hr_sk field earlier in handshake_req_submit
Date: Tue, 28 Mar 2023 18:12:55 +0000	[thread overview]
Message-ID: <CE691A38-999E-4128-880D-F6A5AEB20D79@oracle.com> (raw)
In-Reply-To: <20230328181040.292486-1-jlayton@kernel.org>



> On Mar 28, 2023, at 2:10 PM, Jeff Layton <jlayton@kernel.org> wrote:
> 
> Otherwise, the request is always hashed with the socket set to a NULL
> pointer.

Sounds plausible. I will need to check the clean-up paths too.


> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> net/handshake/request.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I think this is the problem I was hitting earlier. Chuck, feel free to
> fold this into the original patch that adds this code.
> 
> diff --git a/net/handshake/request.c b/net/handshake/request.c
> index 54ba304b5bef..44a097210e59 100644
> --- a/net/handshake/request.c
> +++ b/net/handshake/request.c
> @@ -207,6 +207,7 @@ int handshake_req_submit(struct socket *sock, struct handshake_req *req,
> 	if (READ_ONCE(hn->hn_pending) >= hn->hn_pending_max)
> 		goto out_err;
> 
> +	req->hr_sk = sk;
> 	req->hr_odestruct = sk->sk_destruct;
> 	sk->sk_destruct = handshake_sk_destruct;
> 	spin_lock(&hn->hn_lock);
> @@ -230,7 +231,6 @@ int handshake_req_submit(struct socket *sock, struct handshake_req *req,
> 
> 	/* Prevent socket release while a handshake request is pending */
> 	sock_hold(sk);
> -	req->hr_sk = sk;
> 
> 	trace_handshake_submit(net, req, sk);
> 	return 0;
> -- 
> 2.39.2
> 

--
Chuck Lever



  reply	other threads:[~2023-03-28 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 18:10 [PATCH] handshake: set hr_sk field earlier in handshake_req_submit Jeff Layton
2023-03-28 18:12 ` Chuck Lever III [this message]
2023-03-28 20:29   ` Jeff Layton
2023-03-28 20:33     ` Chuck Lever III

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=CE691A38-999E-4128-880D-F6A5AEB20D79@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.