Merge misc fixes from Andrew Morton: "10 patches. Subsystems affected by this patch series: ipc, MAINTAINERS, and mm (vmscan, debug, pagemap, kmemleak, and selftests)" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" MAINTAINERS: update rppt's email mm/kmemleak: avoid scanning potential huge holes ipc/sem: do not sleep with a spin lock held mm/pgtable: define pte_index so that preprocessor could recognize it mm/page_table_check: check entries at pmd levels mm/khugepaged: unify collapse pmd clear, flush and free mm/page_table_check: use unsigned long for page counters and cleanup mm/debug_vm_pgtable: remove pte entry from the page table Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
Showing the changes to include (2 of 10 files). Show all
Unified · Split
| @@ -26,6 +26,9 @@ void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, · 25 unmodified lines | ||
| 26 | 26 | pmd_t *pmdp, pmd_t pmd); |
| 27 | 27 | void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, |
| 28 | 28 | pud_t *pudp, pud_t pud); |
| 29 | +void __page_table_check_pte_clear_range(struct mm_struct *mm, | |
| 30 | + unsigned long addr, | |
| 31 | + pmd_t pmd); | |
| 29 | 32 | |
| 30 | 33 | static inline void page_table_check_alloc(struct page *page, unsigned int order) |
| 31 | 34 | { |
| @@ -100,6 +103,16 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 68 unmodified lines | ||
| 100 | 103 | __page_table_check_pud_set(mm, addr, pudp, pud); |
| 101 | 104 | } |
| 102 | 105 | |
| 106 | +static inline void page_table_check_pte_clear_range(struct mm_struct *mm, | |
| 107 | + unsigned long addr, | |
| 108 | + pmd_t pmd) | |
| 109 | +{ | |
| 110 | + if (static_branch_likely(&page_table_check_disabled)) | |
| 111 | + return; | |
| 112 | + | |
| 113 | + __page_table_check_pte_clear_range(mm, addr, pmd); | |
| 114 | +} | |
| 115 | + | |
| 103 | 116 | #else |
| 104 | 117 | |
| 105 | 118 | static inline void page_table_check_alloc(struct page *page, unsigned int order) |
| @@ -143,5 +156,11 @@ static inline void page_table_check_pud_set(struct mm_struct *mm, · 37 unmodified lines | ||
| 143 | 156 | { |
| 144 | 157 | } |
| 145 | 158 | |
| 159 | +static inline void page_table_check_pte_clear_range(struct mm_struct *mm, | |
| 160 | + unsigned long addr, | |
| 161 | + pmd_t pmd) | |
| 162 | +{ | |
| 163 | +} | |
| 164 | + | |
| 146 | 165 | #endif /* CONFIG_PAGE_TABLE_CHECK */ |
| 147 | 166 | #endif /* __LINUX_PAGE_TABLE_CHECK_H */ |
| @@ -62,6 +62,7 @@ static inline unsigned long pte_index(unsigned long address) · 61 unmodified lines | ||
| 62 | 62 | { |
| 63 | 63 | return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); |
| 64 | 64 | } |
| 65 | +#define pte_index pte_index | |
| 65 | 66 | |
| 66 | 67 | #ifndef pmd_index |
| 67 | 68 | static inline unsigned long pmd_index(unsigned long address) |