[PATCH 2/2] lib/scatterlist.c: add more commit for sg_alloc_table_from_pages

From: Huang Shijie
Date: Sun Apr 07 2019 - 22:38:22 EST


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@xxxxxxxxxxx>
---
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