From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH net 1/2] rds: tcp: use sock_create_lite() to create the accept socket
Date: Thu, 6 Jul 2017 09:43:50 -0700 [thread overview]
Message-ID: <ff81c72f-0ce3-fbd7-1330-31151fa5198a@oracle.com> (raw)
In-Reply-To: <6918d62064a34e62638f7bb47e4dcdf7de943549.1499352757.git.sowmini.varadhan@oracle.com>
On 7/6/2017 8:15 AM, Sowmini Varadhan wrote:
> There are two problems with calling sock_create_kern() from
> rds_tcp_accept_one()
> 1. it sets up a new_sock->sk that is wasteful, because this ->sk
> is going to get replaced by inet_accept() in the subsequent ->accept()
> 2. The new_sock->sk is a leaked reference in sock_graft() which
> expects to find a null parent->sk
>
> Avoid these problems by calling sock_create_lite().
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
next prev parent reply other threads:[~2017-07-06 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 15:15 [PATCH net 0/2] rds-tcp: sock_graft() leak Sowmini Varadhan
2017-07-06 15:15 ` [PATCH net 1/2] rds: tcp: use sock_create_lite() to create the accept socket Sowmini Varadhan
2017-07-06 16:43 ` Santosh Shilimkar [this message]
2017-07-06 15:15 ` [PATCH net 2/2] net/sock: add WARN_ON(parent->sk) in sock_graft() Sowmini Varadhan
2017-07-08 10:17 ` [PATCH net 0/2] rds-tcp: sock_graft() leak David Miller
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=ff81c72f-0ce3-fbd7-1330-31151fa5198a@oracle.com \
--to=santosh.shilimkar@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.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).