From: Huang Shijie <sjhuang@iluvatar.ai>
To: <akpm@linux-foundation.org>
Cc: <william.kucharski@oracle.com>, <ira.weiny@intel.com>,
<palmer@sifive.com>, <axboe@kernel.dk>, <keescook@chromium.org>,
<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
Huang Shijie <sjhuang@iluvatar.ai>
Subject: [PATCH 2/2] lib/scatterlist.c: add more commit for sg_alloc_table_from_pages
Date: Mon, 8 Apr 2019 10:37:46 +0800 [thread overview]
Message-ID: <20190408023746.16916-2-sjhuang@iluvatar.ai> (raw)
In-Reply-To: <20190408023746.16916-1-sjhuang@iluvatar.ai>
The get_user_pages_fast() may mess up the page order in @pages array,
We will get the wrong DMA results in this case.
Add more commit to clarify it.
Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
lib/scatterlist.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 739dc9fe2c55..c170afb1a25e 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -450,6 +450,9 @@ EXPORT_SYMBOL(__sg_alloc_table_from_pages);
* specified by the page array. The returned sg table is released by
* sg_free_table.
*
+ * Note: Do not use get_user_pages_fast() to pin the pages for @pages array,
+ * it may mess up the page order, and we will get the wrong DMA results.
+
* Returns:
* 0 on success, negative error on failure
*/
--
2.17.1
next prev parent reply other threads:[~2019-04-08 2:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 2:37 [PATCH 1/2] mm/gup.c: fix the wrong comments Huang Shijie
2019-04-08 2:37 ` Huang Shijie [this message]
2019-04-08 14:13 ` Matthew Wilcox
2019-04-09 1:08 ` Huang Shijie
2019-04-09 2:49 ` Matthew Wilcox
2019-04-09 3:04 ` Huang Shijie
2019-04-09 11:19 ` Matthew Wilcox
2019-04-09 14:55 ` Weiny, Ira
2019-04-10 1:20 ` Huang Shijie
2019-04-10 18:04 ` Ira Weiny
2019-04-09 20:23 ` Ira Weiny
2019-04-10 1:18 ` Huang Shijie
2019-04-10 18:08 ` Ira Weiny
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=20190408023746.16916-2-sjhuang@iluvatar.ai \
--to=sjhuang@iluvatar.ai \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=ira.weiny@intel.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=palmer@sifive.com \
--cc=william.kucharski@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).