From: Yanjun Zhu <yanjun.zhu@oracle.com>
To: Santosh Shilimkar <santosh.shilimkar@oracle.com>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [net][PATCH 5/5] rds: avoid version downgrade to legitimate newer peer connections
Date: Wed, 10 Jul 2019 22:26:04 +0800 [thread overview]
Message-ID: <d9f096a8-a5d7-1e91-ea87-ad0593c49f18@oracle.com> (raw)
In-Reply-To: <1562736764-31752-6-git-send-email-santosh.shilimkar@oracle.com>
On 2019/7/10 13:32, Santosh Shilimkar wrote:
> Connections with legitimate tos values can get into usual connection
> race. It can result in consumer reject. We don't want tos value or
> protocol version to be demoted for such connections otherwise
> piers would end up different tos values which can results in
> no connection. Example a peer initiated connection with say
> tos 8 while usual connection racing can get downgraded to tos 0
> which is not desirable.
>
> Patch fixes above issue introduced by commit
> commit d021fabf525f ("rds: rdma: add consumer reject")
>
> Reported-by: Yanjun Zhu <yanjun.zhu@oracle.com>
> Tested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
Thanks. I am OK with this.
Zhu Yanjun
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> ---
> net/rds/rdma_transport.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c
> index 9db455d..ff74c4b 100644
> --- a/net/rds/rdma_transport.c
> +++ b/net/rds/rdma_transport.c
> @@ -117,8 +117,10 @@ static int rds_rdma_cm_event_handler_cmn(struct rdma_cm_id *cm_id,
> ((*err) <= RDS_RDMA_REJ_INCOMPAT))) {
> pr_warn("RDS/RDMA: conn <%pI6c, %pI6c> rejected, dropping connection\n",
> &conn->c_laddr, &conn->c_faddr);
> - conn->c_proposed_version = RDS_PROTOCOL_COMPAT_VERSION;
> - conn->c_tos = 0;
> +
> + if (!conn->c_tos)
> + conn->c_proposed_version = RDS_PROTOCOL_COMPAT_VERSION;
> +
> rds_conn_drop(conn);
> }
> rdsdebug("Connection rejected: %s\n",
next prev parent reply other threads:[~2019-07-10 14:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 5:32 [net][PATCH 0/5] rds fixes Santosh Shilimkar
2019-07-10 5:32 ` [net][PATCH 1/5] rds: fix reordering with composite message notification Santosh Shilimkar
2019-07-10 14:23 ` Yanjun Zhu
2019-07-10 5:32 ` [net][PATCH 2/5] Revert "RDS: IB: split the mr registration and invalidation path" Santosh Shilimkar
2019-07-10 5:32 ` [net][PATCH 3/5] rds: Accept peer connection reject messages due to incompatible version Santosh Shilimkar
2019-07-10 14:24 ` Yanjun Zhu
2019-07-10 5:32 ` [net][PATCH 4/5] rds: Return proper "tos" value to user-space Santosh Shilimkar
2019-07-10 14:25 ` Yanjun Zhu
2019-07-10 5:32 ` [net][PATCH 5/5] rds: avoid version downgrade to legitimate newer peer connections Santosh Shilimkar
2019-07-10 14:26 ` Yanjun Zhu [this message]
2019-07-11 22:27 ` [net][PATCH 0/5] rds fixes 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=d9f096a8-a5d7-1e91-ea87-ad0593c49f18@oracle.com \
--to=yanjun.zhu@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=santosh.shilimkar@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