linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cheng Xu <chengyou@linux.alibaba.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	kernel-janitors@vger.kernel.org, linux-rdma@vger.kernel.org,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Kai Shen <kaishen@linux.alibaba.com>,
	Leon Romanovsky <leon@kernel.org>,
	Yang Li <yang.lee@linux.alibaba.com>
Cc: cocci@inria.fr, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RDMA/erdma: Fix exception handling in erdma_accept_newconn()
Date: Sun, 19 Mar 2023 21:36:20 +0800	[thread overview]
Message-ID: <167179d0-e1ea-39a8-4143-949ad57294c2@linux.alibaba.com> (raw)
In-Reply-To: <f0f96f74-21d1-f5bf-1086-1c3ce0ea18f5@web.de>



On 3/19/23 4:15 AM, Markus Elfring wrote:
> Date: Sat, 18 Mar 2023 21:08:58 +0100
> 

<...>

> +disassoc_socket:
> +    erdma_socket_disassoc(new_s);
> +    sock_release(new_s);
> +    new_cep->state = ERDMA_EPSTATE_CLOSED;
> +    erdma_cancel_mpatimer(new_cep);
> +put_cep:
> +    erdma_cep_put(new_cep);> +    new_cep->sock = NULL;

Thanks, but this causes an use-after-free issue because new_cep will be
released after last erdma_cep_put being called.

Cheng Xu

>  }
>  
>  static int erdma_newconn_connected(struct erdma_cep *cep)

  parent reply	other threads:[~2023-03-19 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f9303bdc-b1a7-be5e-56c6-dfa8232b8b55@web.de>
     [not found] ` <afe30fc6-04c9-528c-f84a-67902b5a6ed8@web.de>
2023-03-19 11:40   ` [PATCH] RDMA/siw: Fix exception handling in siw_accept_newconn() Leon Romanovsky
     [not found]     ` <1c06e86d-1468-c11a-8344-9563ad6047b5@web.de>
2023-03-19 14:11       ` Leon Romanovsky
     [not found]         ` <a03c1d04-a41e-7722-c36a-bd6f61094702@web.de>
2023-03-19 17:37           ` Leon Romanovsky
     [not found] ` <f0f96f74-21d1-f5bf-1086-1c3ce0ea18f5@web.de>
2023-03-19 11:41   ` [PATCH] RDMA/erdma: Fix exception handling in erdma_accept_newconn() Leon Romanovsky
2023-03-19 13:36   ` Cheng Xu [this message]
     [not found] ` <8f785de5-ebe2-edd9-2155-f440acacc643@web.de>
     [not found]   ` <01af2ec9-4758-1fe6-0d74-b30b95c3e9a5@web.de>
2023-04-09  9:59     ` [PATCH 0/2] IB/uverbs: Adjustments for create_qp() Leon Romanovsky

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=167179d0-e1ea-39a8-4143-949ad57294c2@linux.alibaba.com \
    --to=chengyou@linux.alibaba.com \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=jgg@ziepe.ca \
    --cc=kaishen@linux.alibaba.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yang.lee@linux.alibaba.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).