Merge fixes from Andrew Morton: "26 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (26 commits) userfaultfd: remove wrong comment from userfaultfd_ctx_get() fat: fix using uninitialized fields of fat_inode/fsinfo_inode sh: cayman: IDE support fix kasan: fix races in quarantine_remove_cache() kasan: resched in quarantine_remove_cache() mm: do not call mem_cgroup_free() from within mem_cgroup_alloc() thp: fix another corner case of munlock() vs. THPs rmap: fix NULL-pointer dereference on THP munlocking mm/memblock.c: fix memblock_next_valid_pfn() userfaultfd: selftest: vm: allow to build in vm/ directory userfaultfd: non-cooperative: userfaultfd_remove revalidate vma in MADV_DONTNEED userfaultfd: non-cooperative: fix fork fctx->new memleak mm/cgroup: avoid panic when init with low memory drivers/md/bcache/util.h: remove duplicate inclusion of blkdev.h mm/vmstats: add thp_split_pud event for clarity include/linux/fs.h: fix unsigned enum warning with gcc-4.2 userfaultfd: non-cooperative: release all ctx in dup_userfaultfd_complete userfaultfd: non-cooperative: robustness check userfaultfd: non-cooperative: rollback userfaultfd_exit x86, mm: unify exit paths in gup_pte_range() ...
Showing the changes to include (7 of 54 files). Show all
Unified · Split
| @@ -20,7 +20,7 @@ · 19 unmodified lines | |||
| 20 | #define CS42L42_HPOUT_LOAD_1NF 0 | 20 | #define CS42L42_HPOUT_LOAD_1NF 0 |
| 21 | #define CS42L42_HPOUT_LOAD_10NF 1 | 21 | #define CS42L42_HPOUT_LOAD_10NF 1 |
| 22 | 22 | ||
| 23 | /* HPOUT Clamp to GND Overide */ | 23 | /* HPOUT Clamp to GND Override */ |
| 24 | #define CS42L42_HPOUT_CLAMP_EN 0 | 24 | #define CS42L42_HPOUT_CLAMP_EN 0 |
| 25 | #define CS42L42_HPOUT_CLAMP_DIS 1 | 25 | #define CS42L42_HPOUT_CLAMP_DIS 1 |
| 26 | 26 | ||
| @@ -2678,7 +2678,7 @@ static const char * const kernel_read_file_str[] = { · 2677 unmodified lines | |||
| 2678 | 2678 | ||
| 2679 | static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) | 2679 | static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) |
| 2680 | { | 2680 | { |
| 2681 | if (id < 0 || id >= READING_MAX_ID) | 2681 | if ((unsigned)id >= READING_MAX_ID) |
| 2682 | return kernel_read_file_str[READING_UNKNOWN]; | 2682 | return kernel_read_file_str[READING_UNKNOWN]; |
| 2683 | 2683 | ||
| 2684 | return kernel_read_file_str[id]; | 2684 | return kernel_read_file_str[id]; |
| @@ -65,7 +65,7 @@ struct regulator_state { · 64 unmodified lines | |||
| 65 | int uV; /* suspend voltage */ | 65 | int uV; /* suspend voltage */ |
| 66 | unsigned int mode; /* suspend regulator operating mode */ | 66 | unsigned int mode; /* suspend regulator operating mode */ |
| 67 | int enabled; /* is regulator enabled in this suspend state */ | 67 | int enabled; /* is regulator enabled in this suspend state */ |
| 68 | int disabled; /* is the regulator disbled in this suspend state */ | 68 | int disabled; /* is the regulator disabled in this suspend state */ |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | /** | 71 | /** |
| @@ -61,8 +61,7 @@ extern void mremap_userfaultfd_complete(struct vm_userfaultfd_ctx *, · 60 unmodified lines | |||
| 61 | unsigned long from, unsigned long to, | 61 | unsigned long from, unsigned long to, |
| 62 | unsigned long len); | 62 | unsigned long len); |
| 63 | 63 | ||
| 64 | extern void userfaultfd_remove(struct vm_area_struct *vma, | 64 | extern bool userfaultfd_remove(struct vm_area_struct *vma, |
| 65 | struct vm_area_struct **prev, | ||
| 66 | unsigned long start, | 65 | unsigned long start, |
| 67 | unsigned long end); | 66 | unsigned long end); |
| 68 | 67 | ||
| @@ -72,8 +71,6 @@ extern int userfaultfd_unmap_prep(struct vm_area_struct *vma, · 3 unmodified lines | |||
| 72 | extern void userfaultfd_unmap_complete(struct mm_struct *mm, | 71 | extern void userfaultfd_unmap_complete(struct mm_struct *mm, |
| 73 | struct list_head *uf); | 72 | struct list_head *uf); |
| 74 | 73 | ||
| 75 | extern void userfaultfd_exit(struct mm_struct *mm); | ||
| 76 | |||
| 77 | #else /* CONFIG_USERFAULTFD */ | 74 | #else /* CONFIG_USERFAULTFD */ |
| 78 | 75 | ||
| 79 | /* mm helpers */ | 76 | /* mm helpers */ |
| @@ -120,11 +117,11 @@ static inline void mremap_userfaultfd_complete(struct vm_userfaultfd_ctx *ctx, · 40 unmodified lines | |||
| 120 | { | 117 | { |
| 121 | } | 118 | } |
| 122 | 119 | ||
| 123 | static inline void userfaultfd_remove(struct vm_area_struct *vma, | 120 | static inline bool userfaultfd_remove(struct vm_area_struct *vma, |
| 124 | struct vm_area_struct **prev, | ||
| 125 | unsigned long start, | 121 | unsigned long start, |
| 126 | unsigned long end) | 122 | unsigned long end) |
| 127 | { | 123 | { |
| 124 | return true; | ||
| 128 | } | 125 | } |
| 129 | 126 | ||
| 130 | static inline int userfaultfd_unmap_prep(struct vm_area_struct *vma, | 127 | static inline int userfaultfd_unmap_prep(struct vm_area_struct *vma, |
| @@ -139,10 +136,6 @@ static inline void userfaultfd_unmap_complete(struct mm_struct *mm, · 8 unmodified lines | |||
| 139 | { | 136 | { |
| 140 | } | 137 | } |
| 141 | 138 | ||
| 142 | static inline void userfaultfd_exit(struct mm_struct *mm) | ||
| 143 | { | ||
| 144 | } | ||
| 145 | |||
| 146 | #endif /* CONFIG_USERFAULTFD */ | 139 | #endif /* CONFIG_USERFAULTFD */ |
| 147 | 140 | ||
| 148 | #endif /* _LINUX_USERFAULTFD_K_H */ | 141 | #endif /* _LINUX_USERFAULTFD_K_H */ |
| @@ -79,6 +79,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, · 78 unmodified lines | |||
| 79 | THP_SPLIT_PAGE_FAILED, | 79 | THP_SPLIT_PAGE_FAILED, |
| 80 | THP_DEFERRED_SPLIT_PAGE, | 80 | THP_DEFERRED_SPLIT_PAGE, |
| 81 | THP_SPLIT_PMD, | 81 | THP_SPLIT_PMD, |
| 82 | #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD | ||
| 83 | THP_SPLIT_PUD, | ||
| 84 | #endif | ||
| 82 | THP_ZERO_PAGE_ALLOC, | 85 | THP_ZERO_PAGE_ALLOC, |
| 83 | THP_ZERO_PAGE_ALLOC_FAILED, | 86 | THP_ZERO_PAGE_ALLOC_FAILED, |
| 84 | #endif | 87 | #endif |
| @@ -59,7 +59,7 @@ struct lap_cb; · 58 unmodified lines | |||
| 59 | * Slot timer must never exceed 85 ms, and must always be at least 25 ms, | 59 | * Slot timer must never exceed 85 ms, and must always be at least 25 ms, |
| 60 | * suggested to 75-85 msec by IrDA lite. This doesn't work with a lot of | 60 | * suggested to 75-85 msec by IrDA lite. This doesn't work with a lot of |
| 61 | * devices, and other stackes uses a lot more, so it's best we do it as well | 61 | * devices, and other stackes uses a lot more, so it's best we do it as well |
| 62 | * (Note : this is the default value and sysctl overides it - Jean II) | 62 | * (Note : this is the default value and sysctl overrides it - Jean II) |
| 63 | */ | 63 | */ |
| 64 | #define SLOT_TIMEOUT (90*HZ/1000) | 64 | #define SLOT_TIMEOUT (90*HZ/1000) |
| 65 | 65 | ||
| @@ -18,8 +18,7 @@ · 17 unmodified lines | |||
| 18 | * means the userland is reading). | 18 | * means the userland is reading). |
| 19 | */ | 19 | */ |
| 20 | #define UFFD_API ((__u64)0xAA) | 20 | #define UFFD_API ((__u64)0xAA) |
| 21 | #define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_EXIT | \ | 21 | #define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ |
| 22 | UFFD_FEATURE_EVENT_FORK | \ | ||
| 23 | UFFD_FEATURE_EVENT_REMAP | \ | 22 | UFFD_FEATURE_EVENT_REMAP | \ |
| 24 | UFFD_FEATURE_EVENT_REMOVE | \ | 23 | UFFD_FEATURE_EVENT_REMOVE | \ |
| 25 | UFFD_FEATURE_EVENT_UNMAP | \ | 24 | UFFD_FEATURE_EVENT_UNMAP | \ |
| @@ -113,7 +112,6 @@ struct uffd_msg { · 87 unmodified lines | |||
| 113 | #define UFFD_EVENT_REMAP 0x14 | 112 | #define UFFD_EVENT_REMAP 0x14 |
| 114 | #define UFFD_EVENT_REMOVE 0x15 | 113 | #define UFFD_EVENT_REMOVE 0x15 |
| 115 | #define UFFD_EVENT_UNMAP 0x16 | 114 | #define UFFD_EVENT_UNMAP 0x16 |
| 116 | #define UFFD_EVENT_EXIT 0x17 | ||
| 117 | 115 | ||
| 118 | /* flags for UFFD_EVENT_PAGEFAULT */ | 116 | /* flags for UFFD_EVENT_PAGEFAULT */ |
| 119 | #define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */ | 117 | #define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */ |
| @@ -163,7 +161,6 @@ struct uffdio_api { · 43 unmodified lines | |||
| 163 | #define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) | 161 | #define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) |
| 164 | #define UFFD_FEATURE_MISSING_SHMEM (1<<5) | 162 | #define UFFD_FEATURE_MISSING_SHMEM (1<<5) |
| 165 | #define UFFD_FEATURE_EVENT_UNMAP (1<<6) | 163 | #define UFFD_FEATURE_EVENT_UNMAP (1<<6) |
| 166 | #define UFFD_FEATURE_EVENT_EXIT (1<<7) | ||
| 167 | __u64 features; | 164 | __u64 features; |
| 168 | 165 | ||
| 169 | __u64 ioctls; | 166 | __u64 ioctls; |