The patch titled Subject: lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix has been added to the -mm tree. Its filename is lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Imre Deak <imre.deak@xxxxxxxxx> Subject: lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix - Fix the mapping size to be page-size limited. Thanks to Stephen Warren for tracking down the bug. Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Cc: James Hogan <james.hogan@xxxxxxxxxx> Cc: Stephen Warren <swarren@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/scatterlist.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN lib/scatterlist.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix lib/scatterlist.c --- a/lib/scatterlist.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix +++ a/lib/scatterlist.c @@ -493,6 +493,8 @@ bool sg_miter_next(struct sg_mapping_ite miter->__offset = pgoffset ? 0 : sg->offset; miter->__remaining = sg->offset + sg->length - (pgoffset << PAGE_SHIFT) - miter->__offset; + miter->__remaining = min_t(unsigned long, miter->__remaining, + PAGE_SIZE - miter->__offset); } miter->page = miter->piter.page; miter->consumed = miter->length = miter->__remaining; _ Patches currently in -mm which might be from imre.deak@xxxxxxxxx are linux-next.patch lib-scatterlist-add-simple-page-iterator.patch lib-scatterlist-use-page-iterator-in-the-mapping-iterator.patch lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix.patch lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html