* + mm-support-thps-in-zero_user_segments-fix.patch added to -mm tree
@ 2020-11-26 0:05 akpm
2020-11-26 7:56 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2020-11-26 0:05 UTC (permalink / raw)
To: bigeasy, jack, mgorman, mhocko, mm-commits, shy828301,
songliubraving, willy, ziy
The patch titled
Subject: opcode: 0000 EIP: zero_user_segments]
has been added to the -mm tree. Its filename is
mm-support-thps-in-zero_user_segments-fix.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-support-thps-in-zero_user_segments-fix.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-support-thps-in-zero_user_segments-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/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Matthew Wilcox <willy@infradead.org>
Subject: opcode: 0000 EIP: zero_user_segments]
I didn't realise start1 was allowed to be less than start2.
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/highmem.c | 39 ++++++++++++++++-----------------------
1 file changed, 16 insertions(+), 23 deletions(-)
--- a/mm/highmem.c~mm-support-thps-in-zero_user_segments-fix
+++ a/mm/highmem.c
@@ -379,46 +379,39 @@ void zero_user_segments(struct page *pag
BUG_ON(end1 > page_size(page) || end2 > page_size(page));
for (i = 0; i < compound_nr(page); i++) {
- void *kaddr;
- unsigned this_end;
+ void *kaddr = NULL;
- if (end1 == 0 && start2 >= PAGE_SIZE) {
- start2 -= PAGE_SIZE;
- end2 -= PAGE_SIZE;
- continue;
- }
+ if (start1 < PAGE_SIZE || start2 < PAGE_SIZE)
+ kaddr = kmap_atomic(page + i);
if (start1 >= PAGE_SIZE) {
start1 -= PAGE_SIZE;
end1 -= PAGE_SIZE;
- if (start2) {
- start2 -= PAGE_SIZE;
- end2 -= PAGE_SIZE;
- }
- continue;
- }
-
- kaddr = kmap_atomic(page + i);
+ } else {
+ unsigned this_end = min_t(unsigned, end1, PAGE_SIZE);
- this_end = min_t(unsigned, end1, PAGE_SIZE);
- if (end1 > start1)
- memset(kaddr + start1, 0, this_end - start1);
- end1 -= this_end;
- start1 = 0;
+ if (end1 > start1)
+ memset(kaddr + start1, 0, this_end - start1);
+ end1 -= this_end;
+ start1 = 0;
+ }
if (start2 >= PAGE_SIZE) {
start2 -= PAGE_SIZE;
end2 -= PAGE_SIZE;
} else {
- this_end = min_t(unsigned, end2, PAGE_SIZE);
+ unsigned this_end = min_t(unsigned, end2, PAGE_SIZE);
+
if (end2 > start2)
memset(kaddr + start2, 0, this_end - start2);
end2 -= this_end;
start2 = 0;
}
- kunmap_atomic(kaddr);
- flush_dcache_page(page + i);
+ if (kaddr) {
+ kunmap_atomic(kaddr);
+ flush_dcache_page(page + i);
+ }
if (!end1 && !end2)
break;
_
Patches currently in -mm which might be from willy@infradead.org are
sparc-fix-handling-of-page-table-constructor-failure.patch
mm-move-free_unref_page-to-mm-internalh.patch
mm-page-flags-fix-comment.patch
mm-page_alloc-add-__free_pages-documentation.patch
mm-support-thps-in-zero_user_segments.patch
mm-support-thps-in-zero_user_segments-fix.patch
mm-make-pagecache-tagged-lookups-return-only-head-pages.patch
mm-shmem-use-pagevec_lookup-in-shmem_unlock_mapping.patch
mm-swap-optimise-get_shadow_from_swap_cache.patch
mm-add-fgp_entry.patch
mm-filemap-rename-find_get_entry-to-mapping_get_entry.patch
mm-filemap-add-helper-for-finding-pages.patch
mm-filemap-add-helper-for-finding-pages-fix.patch
mm-filemap-add-mapping_seek_hole_data.patch
mm-filemap-add-mapping_seek_hole_data-fix.patch
iomap-use-mapping_seek_hole_data.patch
mm-add-and-use-find_lock_entries.patch
mm-add-and-use-find_lock_entries-fix.patch
mm-add-an-end-parameter-to-find_get_entries.patch
mm-add-an-end-parameter-to-pagevec_lookup_entries.patch
mm-remove-nr_entries-parameter-from-pagevec_lookup_entries.patch
mm-pass-pvec-directly-to-find_get_entries.patch
mm-remove-pagevec_lookup_entries.patch
mm-truncateshmem-handle-truncates-that-split-thps.patch
mm-truncateshmem-handle-truncates-that-split-thps-fix.patch
mm-filemap-return-only-head-pages-from-find_get_entries.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + mm-support-thps-in-zero_user_segments-fix.patch added to -mm tree
2020-11-26 0:05 + mm-support-thps-in-zero_user_segments-fix.patch added to -mm tree akpm
@ 2020-11-26 7:56 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2020-11-26 7:56 UTC (permalink / raw)
To: akpm
Cc: jack, mgorman, mhocko, mm-commits, shy828301, songliubraving, willy, ziy
On 2020-11-25 16:05:18 [-0800], akpm@linux-foundation.org wrote:
> ------------------------------------------------------
> From: Matthew Wilcox <willy@infradead.org>
> Subject: opcode: 0000 EIP: zero_user_segments]
>
> I didn't realise start1 was allowed to be less than start2.
>
> Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This should be
Reported-by:Naresh Kamboju <naresh.kamboju@linaro.org>
instead. I just helped with debugging and testing.
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-26 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 0:05 + mm-support-thps-in-zero_user_segments-fix.patch added to -mm tree akpm
2020-11-26 7:56 ` Sebastian Andrzej Siewior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.