Merge branch 'akpm' (patches from Andrew)
Merge commit. Changes below are compared with the first parent: 1a3b1bba.
Changes
8 files changed · +24 −14
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| .mailmap | modified | +4 | −0 | View file |
| MAINTAINERS | modified | +1 | −0 | View file |
| include/linux/mmzone.h | modified | +7 | −4 | View file |
| lib/lz4/lz4_decompress.c | modified | +6 | −2 | View file |
| mm/highmem.c | modified | +2 | −2 | View file |
| mm/list_lru.c | modified | +0 | −6 | View file |
| mm/mempolicy.c | modified | +1 | −0 | View file |
| mm/mremap.c | modified | +3 | −0 | View file |
.mailmap
View filediff --git a/.mailmap b/.mailmap
index b9d3582..9345815 100644
--- a/.mailmap
+++ b/.mailmap
@@ -391,6 +391,10 @@ Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Valdis Kletnieks <[email protected]>
+Vasily Averin <[email protected]> <[email protected]>
+Vasily Averin <[email protected]> <[email protected]>
+Vasily Averin <[email protected]> <[email protected]>
+Vasily Averin <[email protected]> <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
MAINTAINERS
View filediff --git a/MAINTAINERS b/MAINTAINERS
index 3af36d8..17156b0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4791,6 +4791,7 @@ F: .clang-format
CLANG/LLVM BUILD SUPPORT
M: Nathan Chancellor <[email protected]>
M: Nick Desaulniers <[email protected]>
+R: Tom Rix <[email protected]>
S: Supported
W: https://clangbuiltlinux.github.io/
include/linux/mmzone.h
View filediff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 962b14d..46ffab8 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1397,13 +1397,16 @@ static inline unsigned long *section_to_usemap(struct mem_section *ms)
static inline struct mem_section *__nr_to_section(unsigned long nr)
{
+ unsigned long root = SECTION_NR_TO_ROOT(nr);
+
+ if (unlikely(root >= NR_SECTION_ROOTS))
+ return NULL;
+
#ifdef CONFIG_SPARSEMEM_EXTREME
- if (!mem_section)
+ if (!mem_section || !mem_section[root])
return NULL;
#endif
- if (!mem_section[SECTION_NR_TO_ROOT(nr)])
- return NULL;
- return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];
+ return &mem_section[root][nr & SECTION_ROOT_MASK];
}
extern size_t mem_section_usage_size(void);
lib/lz4/lz4_decompress.c
View filediff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index 926f482..fd1728d 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -271,8 +271,12 @@ static FORCE_INLINE int LZ4_decompress_generic(
ip += length;
op += length;
- /* Necessarily EOF, due to parsing restrictions */
- if (!partialDecoding || (cpy == oend))
+ /* Necessarily EOF when !partialDecoding.
+ * When partialDecoding, it is EOF if we've either
+ * filled the output buffer or
+ * can't proceed with reading an offset for following match.
+ */
+ if (!partialDecoding || (cpy == oend) || (ip >= (iend - 2)))
break;
} else {
/* may overwrite up to WILDCOPYLENGTH beyond cpy */
mm/highmem.c
View filediff --git a/mm/highmem.c b/mm/highmem.c
index 0cc0c4d..1a69299 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -624,7 +624,7 @@ void __kmap_local_sched_out(void)
/* With debug all even slots are unmapped and act as guard */
if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
- WARN_ON_ONCE(!pte_none(pteval));
+ WARN_ON_ONCE(pte_val(pteval) != 0);
continue;
}
if (WARN_ON_ONCE(pte_none(pteval)))
@@ -661,7 +661,7 @@ void __kmap_local_sched_in(void)
/* With debug all even slots are unmapped and act as guard */
if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
- WARN_ON_ONCE(!pte_none(pteval));
+ WARN_ON_ONCE(pte_val(pteval) != 0);
continue;
}
if (WARN_ON_ONCE(pte_none(pteval)))
mm/list_lru.c
View filediff --git a/mm/list_lru.c b/mm/list_lru.c
index c669d87..ba76428 100644
--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -395,12 +395,6 @@ static void memcg_reparent_list_lru_node(struct list_lru *lru, int nid,
struct list_lru_one *src, *dst;
/*
- * If there is no lru entry in this nlru, we can skip it immediately.
- */
- if (!READ_ONCE(nlru->nr_items))
- return;
-
- /*
* Since list_lru_{add,del} may be called under an IRQ-safe lock,
* we have to use IRQ-safe primitives here to avoid deadlock.
*/
mm/mempolicy.c
View filediff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 649bd3b..8c74107 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2743,6 +2743,7 @@ alloc_new:
mpol_new = kmem_cache_alloc(policy_cache, GFP_KERNEL);
if (!mpol_new)
goto err_out;
+ atomic_set(&mpol_new->refcnt, 1);
goto restart;
}
mm/mremap.c
View filediff --git a/mm/mremap.c b/mm/mremap.c
index 9d76da7..303d329 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -486,6 +486,9 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
pmd_t *old_pmd, *new_pmd;
pud_t *old_pud, *new_pud;
+ if (!len)
+ return 0;
+
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);