public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Zhu Yanjun <yanjun.zhu@intel.com>
Cc: zyjzyj2000@gmail.com, leon@kernel.org,
	linux-rdma@vger.kernel.org, Zhu Yanjun <yanjun.zhu@linux.dev>
Subject: Re: [for-next PATCH 1/1] RDMA/rxe: sgt_append from ib_umem_get is not highmem
Date: Mon, 21 Nov 2022 11:28:49 -0400	[thread overview]
Message-ID: <Y3uZMQJgcNFDhq5L@ziepe.ca> (raw)
In-Reply-To: <20221120012939.539953-1-yanjun.zhu@intel.com>

On Sat, Nov 19, 2022 at 08:29:38PM -0500, Zhu Yanjun wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> In ib_umem_get, sgt_append is allocated from the function
> sg_alloc_append_table_from_pages. And it is not from highmem.

You've confused the allocation of the SGL table itself with the
page_address called on the struct page * stored inside the SGL table.

Think of the SGL as an array of 'struct page *'

The page_address() can return NULL because the 'struct page *' it
contains came from userspace and could very will be highmem.

Jason

  parent reply	other threads:[~2022-11-21 15:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  3:04 [PATCH for-next v2] RDMA/rxe: Fix mr->map double free Li Zhijian
2022-11-12  3:29 ` lizhijian
2022-11-13 12:40   ` Yanjun Zhu
2022-11-16  0:10 ` Yanjun Zhu
2022-11-16  2:39   ` lizhijian
2022-11-19  0:15 ` Jason Gunthorpe
2022-11-19  8:25   ` Yanjun Zhu
2022-11-20  1:29     ` [for-next PATCH 1/1] RDMA/rxe: sgt_append from ib_umem_get is not highmem Zhu Yanjun
2022-11-19 10:30       ` lizhijian
2022-11-19 13:20         ` Yanjun Zhu
2022-11-21 15:28       ` Jason Gunthorpe [this message]
2022-11-22  4:07         ` Yanjun Zhu
2022-11-22 14:06           ` Jason Gunthorpe
2022-11-23  1:53             ` Yanjun Zhu

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=Y3uZMQJgcNFDhq5L@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjun.zhu@intel.com \
    --cc=yanjun.zhu@linux.dev \
    --cc=zyjzyj2000@gmail.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