aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mul.c
diff options
context:
space:
mode:
authorVlastimil Babka <[email protected]>2019-10-14 14:11:40 -0700
committerLinus Torvalds <[email protected]>2019-10-14 15:04:00 -0700
commit5556cfe8d994d5e7b4d50fd91597b8dc0b3a82fd (patch)
treea3e55b8ba5ff41d419619f44e6d12d52be35e78e /lib/mpi/mpi-mul.c
parent2abd839aa7e615f2bbc50c8ba7deb9e40d186768 (diff)
mm, page_owner: fix off-by-one error in __set_page_owner_handle()
Patch series "followups to debug_pagealloc improvements through page_owner", v3. These are followups to [1] which made it to Linus meanwhile. Patches 1 and 3 are based on Kirill's review, patch 2 on KASAN request [2]. It would be nice if all of this made it to 5.4 with [1] already there (or at least Patch 1). This patch (of 3): As noted by Kirill, commit 7e2f2a0cd17c ("mm, page_owner: record page owner for each subpage") has introduced an off-by-one error in __set_page_owner_handle() when looking up page_ext for subpages. As a result, the head page page_owner info is set twice, while for the last tail page, it's not set at all. Fix this and also make the code more efficient by advancing the page_ext pointer we already have, instead of calling lookup_page_ext() for each subpage. Since the full size of struct page_ext is not known at compile time, we can't use a simple page_ext++ statement, so introduce a page_ext_next() inline function for that. Link: http://lkml.kernel.org/r/[email protected] Fixes: 7e2f2a0cd17c ("mm, page_owner: record page owner for each subpage") Signed-off-by: Vlastimil Babka <[email protected]> Reported-by: Kirill A. Shutemov <[email protected]> Reported-by: Miles Chen <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Walter Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions