public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH V2 for-next 1/6] RDMA/hns: Add rq inline data support for hip08 RoCE
Date: Thu, 28 Dec 2017 14:22:17 -0700	[thread overview]
Message-ID: <20171228212217.GA14490@ziepe.ca> (raw)
In-Reply-To: <1514287514-88723-2-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Tue, Dec 26, 2017 at 07:25:09PM +0800, Lijun Ou wrote:

> +	if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE) {
> +		if (hr_qp->rq_inl_buf.wqe_list) {
> +			kfree(hr_qp->rq_inl_buf.wqe_list[0].sg_list);
> +			kfree(hr_qp->rq_inl_buf.wqe_list);
> +			hr_qp->rq_inl_buf.wqe_list[0].sg_list = NULL;

You didn't fix this use after free that Leon commented on.

nulling something that is contained in something you are about to
free is not at all useful.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-28 21:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 11:25 [PATCH V2 for-next 0/6] Add rq inline and bugfixes for hns Lijun Ou
     [not found] ` <1514287514-88723-1-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-26 11:25   ` [PATCH V2 for-next 1/6] RDMA/hns: Add rq inline data support for hip08 RoCE Lijun Ou
     [not found]     ` <1514287514-88723-2-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-28 21:22       ` Jason Gunthorpe [this message]
     [not found]         ` <20171228212217.GA14490-uk2M96/98Pc@public.gmane.org>
2017-12-29  1:45           ` oulijun
2017-12-26 11:25   ` [PATCH V2 for-next 2/6] RDMA/hns: Update the usage of sr_max and rr_max field Lijun Ou
     [not found]     ` <1514287514-88723-3-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-26 11:55       ` Leon Romanovsky
2017-12-26 11:25   ` [PATCH V2 for-next 3/6] RDMA/hns: Set access flags of hip08 RoCE Lijun Ou
2017-12-26 11:25   ` [PATCH V2 for-next 4/6] RDMA/hns: Filter for zero length of sge in hip08 kernel mode Lijun Ou
2017-12-26 11:25   ` [PATCH V2 for-next 5/6] RDMA/hns: Fix QP state judgement before sending work requests Lijun Ou
2017-12-26 11:25   ` [PATCH V2 for-next 6/6] RDMA/hns: Assign dest_qp when deregistering mr Lijun Ou
     [not found]     ` <1514287514-88723-7-git-send-email-oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-28 21:32       ` Jason Gunthorpe
     [not found]         ` <20171228213227.GA14821-uk2M96/98Pc@public.gmane.org>
2017-12-29  1:01           ` oulijun

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=20171228212217.GA14490@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    /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