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 | 20 | #define CS42L42_HPOUT_LOAD_1NF 0 |
| 21 | 21 | #define CS42L42_HPOUT_LOAD_10NF 1 |
| 22 | 22 | |
| 23 | −/* HPOUT Clamp to GND Overide */ | |
| 23 | +/* HPOUT Clamp to GND Override */ | |
| 24 | 24 | #define CS42L42_HPOUT_CLAMP_EN 0 |
| 25 | 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 | 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 | 2682 | return kernel_read_file_str[READING_UNKNOWN]; |
| 2683 | 2683 | |
| 2684 | 2684 | return kernel_read_file_str[id]; |
| @@ -65,7 +65,7 @@ struct regulator_state { · 64 unmodified lines | ||
| 65 | 65 | int uV; /* suspend voltage */ |
| 66 | 66 | unsigned int mode; /* suspend regulator operating mode */ |
| 67 | 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 | 61 | unsigned long from, unsigned long to, |
| 62 | 62 | unsigned long len); |
| 63 | 63 | |
| 64 | −extern void userfaultfd_remove(struct vm_area_struct *vma, | |
| 65 | − struct vm_area_struct **prev, | |
| 64 | +extern bool userfaultfd_remove(struct vm_area_struct *vma, | |
| 66 | 65 | unsigned long start, |
| 67 | 66 | unsigned long end); |
| 68 | 67 | |
| @@ -72,8 +71,6 @@ extern int userfaultfd_unmap_prep(struct vm_area_struct *vma, · 3 unmodified lines | ||
| 72 | 71 | extern void userfaultfd_unmap_complete(struct mm_struct *mm, |
| 73 | 72 | struct list_head *uf); |
| 74 | 73 | |
| 75 | −extern void userfaultfd_exit(struct mm_struct *mm); | |
| 76 | − | |
| 77 | 74 | #else /* CONFIG_USERFAULTFD */ |
| 78 | 75 | |
| 79 | 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, | |
| 124 | − struct vm_area_struct **prev, | |
| 120 | +static inline bool userfaultfd_remove(struct vm_area_struct *vma, | |
| 125 | 121 | unsigned long start, |
| 126 | 122 | unsigned long end) |
| 127 | 123 | { |
| 124 | + return true; | |
| 128 | 125 | } |
| 129 | 126 | |
| 130 | 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 | 139 | #endif /* CONFIG_USERFAULTFD */ |
| 147 | 140 | |
| 148 | 141 | #endif /* _LINUX_USERFAULTFD_K_H */ |
| @@ -79,6 +79,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, · 78 unmodified lines | ||
| 79 | 79 | THP_SPLIT_PAGE_FAILED, |
| 80 | 80 | THP_DEFERRED_SPLIT_PAGE, |
| 81 | 81 | THP_SPLIT_PMD, |
| 82 | +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD | |
| 83 | + THP_SPLIT_PUD, | |
| 84 | +#endif | |
| 82 | 85 | THP_ZERO_PAGE_ALLOC, |
| 83 | 86 | THP_ZERO_PAGE_ALLOC_FAILED, |
| 84 | 87 | #endif |
| @@ -59,7 +59,7 @@ struct lap_cb; · 58 unmodified lines | ||
| 59 | 59 | * Slot timer must never exceed 85 ms, and must always be at least 25 ms, |
| 60 | 60 | * suggested to 75-85 msec by IrDA lite. This doesn't work with a lot of |
| 61 | 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 | 64 | #define SLOT_TIMEOUT (90*HZ/1000) |
| 65 | 65 | |
| @@ -18,8 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | * means the userland is reading). |
| 19 | 19 | */ |
| 20 | 20 | #define UFFD_API ((__u64)0xAA) |
| 21 | −#define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_EXIT | \ | |
| 22 | − UFFD_FEATURE_EVENT_FORK | \ | |
| 21 | +#define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ | |
| 23 | 22 | UFFD_FEATURE_EVENT_REMAP | \ |
| 24 | 23 | UFFD_FEATURE_EVENT_REMOVE | \ |
| 25 | 24 | UFFD_FEATURE_EVENT_UNMAP | \ |
| @@ -113,7 +112,6 @@ struct uffd_msg { · 87 unmodified lines | ||
| 113 | 112 | #define UFFD_EVENT_REMAP 0x14 |
| 114 | 113 | #define UFFD_EVENT_REMOVE 0x15 |
| 115 | 114 | #define UFFD_EVENT_UNMAP 0x16 |
| 116 | −#define UFFD_EVENT_EXIT 0x17 | |
| 117 | 115 | |
| 118 | 116 | /* flags for UFFD_EVENT_PAGEFAULT */ |
| 119 | 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 | 161 | #define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) |
| 164 | 162 | #define UFFD_FEATURE_MISSING_SHMEM (1<<5) |
| 165 | 163 | #define UFFD_FEATURE_EVENT_UNMAP (1<<6) |
| 166 | −#define UFFD_FEATURE_EVENT_EXIT (1<<7) | |
| 167 | 164 | __u64 features; |
| 168 | 165 | |
| 169 | 166 | __u64 ioctls; |