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() ...
Unified · Split
| @@ -10,7 +10,7 @@ Note that kcov does not aim to collect as much coverage as possible. It aims · 9 unmodified lines | ||
| 10 | 10 | to collect more or less stable coverage that is function of syscall inputs. |
| 11 | 11 | To achieve this goal it does not collect coverage in soft/hard interrupts |
| 12 | 12 | and instrumentation of some inherently non-deterministic parts of kernel is |
| 13 | −disbled (e.g. scheduler, locking). | |
| 13 | +disabled (e.g. scheduler, locking). | |
| 14 | 14 | |
| 15 | 15 | Usage |
| 16 | 16 | ----- |
| @@ -45,7 +45,7 @@ Required Properties: · 44 unmodified lines | ||
| 45 | 45 | Optional Properties: |
| 46 | 46 | - reg-names: In addition to the required properties, the following are optional |
| 47 | 47 | - "efuse-address" - Contains efuse base address used to pick up ABB info. |
| 48 | − - "ldo-address" - Contains address of ABB LDO overide register address. | |
| 48 | + - "ldo-address" - Contains address of ABB LDO override register. | |
| 49 | 49 | "efuse-address" is required for this. |
| 50 | 50 | - ti,ldovbb-vset-mask - Required if ldo-address is set, mask for LDO override |
| 51 | 51 | register to provide override vset value. |
| @@ -172,10 +172,6 @@ the same read(2) protocol as for the page fault notifications. The · 171 unmodified lines | ||
| 172 | 172 | manager has to explicitly enable these events by setting appropriate |
| 173 | 173 | bits in uffdio_api.features passed to UFFDIO_API ioctl: |
| 174 | 174 | |
| 175 | −UFFD_FEATURE_EVENT_EXIT - enable notification about exit() of the | |
| 176 | −non-cooperative process. When the monitored process exits, the uffd | |
| 177 | −manager will get UFFD_EVENT_EXIT. | |
| 178 | − | |
| 179 | 175 | UFFD_FEATURE_EVENT_FORK - enable userfaultfd hooks for fork(). When |
| 180 | 176 | this feature is enabled, the userfaultfd context of the parent process |
| 181 | 177 | is duplicated into the newly created process. The manager receives |
| @@ -2086,7 +2086,7 @@ static void cryptocop_job_queue_close(void) · 2085 unmodified lines | ||
| 2086 | 2086 | dma_in_cfg.en = regk_dma_no; |
| 2087 | 2087 | REG_WR(dma, IN_DMA_INST, rw_cfg, dma_in_cfg); |
| 2088 | 2088 | |
| 2089 | − /* Disble the cryptocop. */ | |
| 2089 | + /* Disable the cryptocop. */ | |
| 2090 | 2090 | rw_cfg = REG_RD(strcop, regi_strcop, rw_cfg); |
| 2091 | 2091 | rw_cfg.en = 0; |
| 2092 | 2092 | REG_WR(strcop, regi_strcop, rw_cfg, rw_cfg); |
| @@ -347,23 +347,58 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm, · 346 unmodified lines | ||
| 347 | 347 | __r; \ |
| 348 | 348 | }) |
| 349 | 349 | |
| 350 | +static inline int __pte_write(pte_t pte) | |
| 351 | +{ | |
| 352 | + return !!(pte_raw(pte) & cpu_to_be64(_PAGE_WRITE)); | |
| 353 | +} | |
| 354 | + | |
| 355 | +#ifdef CONFIG_NUMA_BALANCING | |
| 356 | +#define pte_savedwrite pte_savedwrite | |
| 357 | +static inline bool pte_savedwrite(pte_t pte) | |
| 358 | +{ | |
| 359 | + /* | |
| 360 | + * Saved write ptes are prot none ptes that doesn't have | |
| 361 | + * privileged bit sit. We mark prot none as one which has | |
| 362 | + * present and pviliged bit set and RWX cleared. To mark | |
| 363 | + * protnone which used to have _PAGE_WRITE set we clear | |
| 364 | + * the privileged bit. | |
| 365 | + */ | |
| 366 | + return !(pte_raw(pte) & cpu_to_be64(_PAGE_RWX | _PAGE_PRIVILEGED)); | |
| 367 | +} | |
| 368 | +#else | |
| 369 | +#define pte_savedwrite pte_savedwrite | |
| 370 | +static inline bool pte_savedwrite(pte_t pte) | |
| 371 | +{ | |
| 372 | + return false; | |
| 373 | +} | |
| 374 | +#endif | |
| 375 | + | |
| 376 | +static inline int pte_write(pte_t pte) | |
| 377 | +{ | |
| 378 | + return __pte_write(pte) || pte_savedwrite(pte); | |
| 379 | +} | |
| 380 | + | |
| 350 | 381 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
| 351 | 382 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, |
| 352 | 383 | pte_t *ptep) |
| 353 | 384 | { |
| 354 | − if ((pte_raw(*ptep) & cpu_to_be64(_PAGE_WRITE)) == 0) | |
| 355 | − return; | |
| 356 | − | |
| 357 | − pte_update(mm, addr, ptep, _PAGE_WRITE, 0, 0); | |
| 385 | + if (__pte_write(*ptep)) | |
| 386 | + pte_update(mm, addr, ptep, _PAGE_WRITE, 0, 0); | |
| 387 | + else if (unlikely(pte_savedwrite(*ptep))) | |
| 388 | + pte_update(mm, addr, ptep, 0, _PAGE_PRIVILEGED, 0); | |
| 358 | 389 | } |
| 359 | 390 | |
| 360 | 391 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, |
| 361 | 392 | unsigned long addr, pte_t *ptep) |
| 362 | 393 | { |
| 363 | − if ((pte_raw(*ptep) & cpu_to_be64(_PAGE_WRITE)) == 0) | |
| 364 | − return; | |
| 365 | − | |
| 366 | − pte_update(mm, addr, ptep, _PAGE_WRITE, 0, 1); | |
| 394 | + /* | |
| 395 | + * We should not find protnone for hugetlb, but this complete the | |
| 396 | + * interface. | |
| 397 | + */ | |
| 398 | + if (__pte_write(*ptep)) | |
| 399 | + pte_update(mm, addr, ptep, _PAGE_WRITE, 0, 1); | |
| 400 | + else if (unlikely(pte_savedwrite(*ptep))) | |
| 401 | + pte_update(mm, addr, ptep, 0, _PAGE_PRIVILEGED, 1); | |
| 367 | 402 | } |
| 368 | 403 | |
| 369 | 404 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
| @@ -397,11 +432,6 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, · 27 unmodified lines | ||
| 397 | 432 | pte_update(mm, addr, ptep, ~0UL, 0, 0); |
| 398 | 433 | } |
| 399 | 434 | |
| 400 | −static inline int pte_write(pte_t pte) | |
| 401 | −{ | |
| 402 | − return !!(pte_raw(pte) & cpu_to_be64(_PAGE_WRITE)); | |
| 403 | −} | |
| 404 | − | |
| 405 | 435 | static inline int pte_dirty(pte_t pte) |
| 406 | 436 | { |
| 407 | 437 | return !!(pte_raw(pte) & cpu_to_be64(_PAGE_DIRTY)); |
| @@ -465,19 +495,12 @@ static inline pte_t pte_clear_savedwrite(pte_t pte) · 57 unmodified lines | ||
| 465 | 495 | VM_BUG_ON(!pte_protnone(pte)); |
| 466 | 496 | return __pte(pte_val(pte) | _PAGE_PRIVILEGED); |
| 467 | 497 | } |
| 468 | − | |
| 469 | −#define pte_savedwrite pte_savedwrite | |
| 470 | −static inline bool pte_savedwrite(pte_t pte) | |
| 498 | +#else | |
| 499 | +#define pte_clear_savedwrite pte_clear_savedwrite | |
| 500 | +static inline pte_t pte_clear_savedwrite(pte_t pte) | |
| 471 | 501 | { |
| 472 | − /* | |
| 473 | − * Saved write ptes are prot none ptes that doesn't have | |
| 474 | − * privileged bit sit. We mark prot none as one which has | |
| 475 | − * present and pviliged bit set and RWX cleared. To mark | |
| 476 | − * protnone which used to have _PAGE_WRITE set we clear | |
| 477 | − * the privileged bit. | |
| 478 | − */ | |
| 479 | − VM_BUG_ON(!pte_protnone(pte)); | |
| 480 | − return !(pte_raw(pte) & cpu_to_be64(_PAGE_RWX | _PAGE_PRIVILEGED)); | |
| 502 | + VM_WARN_ON(1); | |
| 503 | + return __pte(pte_val(pte) & ~_PAGE_WRITE); | |
| 481 | 504 | } |
| 482 | 505 | #endif /* CONFIG_NUMA_BALANCING */ |
| 483 | 506 | |
| @@ -506,6 +529,8 @@ static inline unsigned long pte_pfn(pte_t pte) · 22 unmodified lines | ||
| 506 | 529 | /* Generic modifiers for PTE bits */ |
| 507 | 530 | static inline pte_t pte_wrprotect(pte_t pte) |
| 508 | 531 | { |
| 532 | + if (unlikely(pte_savedwrite(pte))) | |
| 533 | + return pte_clear_savedwrite(pte); | |
| 509 | 534 | return __pte(pte_val(pte) & ~_PAGE_WRITE); |
| 510 | 535 | } |
| 511 | 536 | |
| @@ -926,6 +951,7 @@ static inline int pmd_protnone(pmd_t pmd) · 414 unmodified lines | ||
| 926 | 951 | |
| 927 | 952 | #define __HAVE_ARCH_PMD_WRITE |
| 928 | 953 | #define pmd_write(pmd) pte_write(pmd_pte(pmd)) |
| 954 | +#define __pmd_write(pmd) __pte_write(pmd_pte(pmd)) | |
| 929 | 955 | #define pmd_savedwrite(pmd) pte_savedwrite(pmd_pte(pmd)) |
| 930 | 956 | |
| 931 | 957 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| @@ -982,11 +1008,10 @@ static inline int __pmdp_test_and_clear_young(struct mm_struct *mm, · 50 unmodified lines | ||
| 982 | 1008 | static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr, |
| 983 | 1009 | pmd_t *pmdp) |
| 984 | 1010 | { |
| 985 | − | |
| 986 | − if ((pmd_raw(*pmdp) & cpu_to_be64(_PAGE_WRITE)) == 0) | |
| 987 | − return; | |
| 988 | − | |
| 989 | − pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0); | |
| 1011 | + if (__pmd_write((*pmdp))) | |
| 1012 | + pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0); | |
| 1013 | + else if (unlikely(pmd_savedwrite(*pmdp))) | |
| 1014 | + pmd_hugepage_update(mm, addr, pmdp, 0, _PAGE_PRIVILEGED); | |
| 990 | 1015 | } |
| 991 | 1016 | |
| 992 | 1017 | static inline int pmd_trans_huge(pmd_t pmd) |
| @@ -601,7 +601,7 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu, · 600 unmodified lines | ||
| 601 | 601 | hva, NULL, NULL); |
| 602 | 602 | if (ptep) { |
| 603 | 603 | pte = kvmppc_read_update_linux_pte(ptep, 1); |
| 604 | − if (pte_write(pte)) | |
| 604 | + if (__pte_write(pte)) | |
| 605 | 605 | write_ok = 1; |
| 606 | 606 | } |
| 607 | 607 | local_irq_restore(flags); |
| @@ -256,7 +256,7 @@ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags, · 255 unmodified lines | ||
| 256 | 256 | } |
| 257 | 257 | pte = kvmppc_read_update_linux_pte(ptep, writing); |
| 258 | 258 | if (pte_present(pte) && !pte_protnone(pte)) { |
| 259 | − if (writing && !pte_write(pte)) | |
| 259 | + if (writing && !__pte_write(pte)) | |
| 260 | 260 | /* make the actual HPTE be read-only */ |
| 261 | 261 | ptel = hpte_make_readonly(ptel); |
| 262 | 262 | is_ci = pte_ci(pte); |
| @@ -128,7 +128,6 @@ static int __init smsc_superio_setup(void) · 127 unmodified lines | ||
| 128 | 128 | SMSC_SUPERIO_WRITE_INDEXED(1, SMSC_PRIMARY_INT_INDEX); |
| 129 | 129 | SMSC_SUPERIO_WRITE_INDEXED(12, SMSC_SECONDARY_INT_INDEX); |
| 130 | 130 | |
| 131 | −#ifdef CONFIG_IDE | |
| 132 | 131 | /* |
| 133 | 132 | * Only IDE1 exists on the Cayman |
| 134 | 133 | */ |
| @@ -158,7 +157,6 @@ static int __init smsc_superio_setup(void) · 23 unmodified lines | ||
| 158 | 157 | SMSC_SUPERIO_WRITE_INDEXED(0x01, 0xc5); /* GP45 = IDE1_IRQ */ |
| 159 | 158 | SMSC_SUPERIO_WRITE_INDEXED(0x00, 0xc6); /* GP46 = nIOROP */ |
| 160 | 159 | SMSC_SUPERIO_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */ |
| 161 | −#endif | |
| 162 | 160 | |
| 163 | 161 | /* Exit the configuration state */ |
| 164 | 162 | outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR); |
| @@ -535,7 +535,7 @@ static void run_sync(void) · 534 unmodified lines | ||
| 535 | 535 | { |
| 536 | 536 | int enable_irqs = irqs_disabled(); |
| 537 | 537 | |
| 538 | − /* We may be called with interrupts disbled (on bootup). */ | |
| 538 | + /* We may be called with interrupts disabled (on bootup). */ | |
| 539 | 539 | if (enable_irqs) |
| 540 | 540 | local_irq_enable(); |
| 541 | 541 | on_each_cpu(do_sync_core, NULL, 1); |
| @@ -106,32 +106,35 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, · 105 unmodified lines | ||
| 106 | 106 | unsigned long end, int write, struct page **pages, int *nr) |
| 107 | 107 | { |
| 108 | 108 | struct dev_pagemap *pgmap = NULL; |
| 109 | − int nr_start = *nr; | |
| 110 | − pte_t *ptep; | |
| 109 | + int nr_start = *nr, ret = 0; | |
| 110 | + pte_t *ptep, *ptem; | |
| 111 | 111 | |
| 112 | − ptep = pte_offset_map(&pmd, addr); | |
| 112 | + /* | |
| 113 | + * Keep the original mapped PTE value (ptem) around since we | |
| 114 | + * might increment ptep off the end of the page when finishing | |
| 115 | + * our loop iteration. | |
| 116 | + */ | |
| 117 | + ptem = ptep = pte_offset_map(&pmd, addr); | |
| 113 | 118 | do { |
| 114 | 119 | pte_t pte = gup_get_pte(ptep); |
| 115 | 120 | struct page *page; |
| 116 | 121 | |
| 117 | 122 | /* Similar to the PMD case, NUMA hinting must take slow path */ |
| 118 | − if (pte_protnone(pte)) { | |
| 119 | − pte_unmap(ptep); | |
| 120 | − return 0; | |
| 121 | − } | |
| 123 | + if (pte_protnone(pte)) | |
| 124 | + break; | |
| 125 | + | |
| 126 | + if (!pte_allows_gup(pte_val(pte), write)) | |
| 127 | + break; | |
| 122 | 128 | |
| 123 | 129 | if (pte_devmap(pte)) { |
| 124 | 130 | pgmap = get_dev_pagemap(pte_pfn(pte), pgmap); |
| 125 | 131 | if (unlikely(!pgmap)) { |
| 126 | 132 | undo_dev_pagemap(nr, nr_start, pages); |
| 127 | − pte_unmap(ptep); | |
| 128 | − return 0; | |
| 133 | + break; | |
| 129 | 134 | } |
| 130 | − } else if (!pte_allows_gup(pte_val(pte), write) || | |
| 131 | − pte_special(pte)) { | |
| 132 | − pte_unmap(ptep); | |
| 133 | − return 0; | |
| 134 | − } | |
| 135 | + } else if (pte_special(pte)) | |
| 136 | + break; | |
| 137 | + | |
| 135 | 138 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); |
| 136 | 139 | page = pte_page(pte); |
| 137 | 140 | get_page(page); |
| @@ -141,9 +144,11 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, · 3 unmodified lines | ||
| 141 | 144 | (*nr)++; |
| 142 | 145 | |
| 143 | 146 | } while (ptep++, addr += PAGE_SIZE, addr != end); |
| 144 | − pte_unmap(ptep - 1); | |
| 147 | + if (addr == end) | |
| 148 | + ret = 1; | |
| 149 | + pte_unmap(ptem); | |
| 145 | 150 | |
| 146 | − return 1; | |
| 151 | + return ret; | |
| 147 | 152 | } |
| 148 | 153 | |
| 149 | 154 | static inline void get_head_page_multiple(struct page *page, int nr) |
| @@ -50,7 +50,7 @@ · 49 unmodified lines | ||
| 50 | 50 | the slower the port i/o. In some cases, setting |
| 51 | 51 | this to zero will speed up the device. (default -1) |
| 52 | 52 | |
| 53 | − major You may use this parameter to overide the | |
| 53 | + major You may use this parameter to override the | |
| 54 | 54 | default major number (46) that this driver |
| 55 | 55 | will use. Be sure to change the device |
| 56 | 56 | name as well. |
| @@ -61,7 +61,7 @@ · 60 unmodified lines | ||
| 61 | 61 | first drive found. |
| 62 | 62 | |
| 63 | 63 | |
| 64 | − major You may use this parameter to overide the | |
| 64 | + major You may use this parameter to override the | |
| 65 | 65 | default major number (45) that this driver |
| 66 | 66 | will use. Be sure to change the device |
| 67 | 67 | name as well. |
| @@ -59,7 +59,7 @@ · 58 unmodified lines | ||
| 59 | 59 | the slower the port i/o. In some cases, setting |
| 60 | 60 | this to zero will speed up the device. (default -1) |
| 61 | 61 | |
| 62 | − major You may use this parameter to overide the | |
| 62 | + major You may use this parameter to override the | |
| 63 | 63 | default major number (47) that this driver |
| 64 | 64 | will use. Be sure to change the device |
| 65 | 65 | name as well. |
| @@ -84,7 +84,7 @@ · 83 unmodified lines | ||
| 84 | 84 | the slower the port i/o. In some cases, setting |
| 85 | 85 | this to zero will speed up the device. (default -1) |
| 86 | 86 | |
| 87 | − major You may use this parameter to overide the | |
| 87 | + major You may use this parameter to override the | |
| 88 | 88 | default major number (97) that this driver |
| 89 | 89 | will use. Be sure to change the device |
| 90 | 90 | name as well. |
| @@ -61,7 +61,7 @@ · 60 unmodified lines | ||
| 61 | 61 | the slower the port i/o. In some cases, setting |
| 62 | 62 | this to zero will speed up the device. (default -1) |
| 63 | 63 | |
| 64 | − major You may use this parameter to overide the | |
| 64 | + major You may use this parameter to override the | |
| 65 | 65 | default major number (96) that this driver |
| 66 | 66 | will use. Be sure to change the device |
| 67 | 67 | name as well. |
| @@ -82,7 +82,7 @@ void cryp_activity(struct cryp_device_data *device_data, · 81 unmodified lines | ||
| 82 | 82 | void cryp_flush_inoutfifo(struct cryp_device_data *device_data) |
| 83 | 83 | { |
| 84 | 84 | /* |
| 85 | − * We always need to disble the hardware before trying to flush the | |
| 85 | + * We always need to disable the hardware before trying to flush the | |
| 86 | 86 | * FIFO. This is something that isn't written in the design |
| 87 | 87 | * specification, but we have been informed by the hardware designers |
| 88 | 88 | * that this must be done. |
| @@ -788,7 +788,7 @@ static int sdma_v3_0_start(struct amdgpu_device *adev) · 787 unmodified lines | ||
| 788 | 788 | } |
| 789 | 789 | } |
| 790 | 790 | |
| 791 | − /* disble sdma engine before programing it */ | |
| 791 | + /* disable sdma engine before programing it */ | |
| 792 | 792 | sdma_v3_0_ctx_switch_enable(adev, false); |
| 793 | 793 | sdma_v3_0_enable(adev, false); |
| 794 | 794 | |
| @@ -543,7 +543,7 @@ static int vmbus_close_internal(struct vmbus_channel *channel) · 542 unmodified lines | ||
| 543 | 543 | /* |
| 544 | 544 | * In case a device driver's probe() fails (e.g., |
| 545 | 545 | * util_probe() -> vmbus_open() returns -ENOMEM) and the device is |
| 546 | − * rescinded later (e.g., we dynamically disble an Integrated Service | |
| 546 | + * rescinded later (e.g., we dynamically disable an Integrated Service | |
| 547 | 547 | * in Hyper-V Manager), the driver's remove() invokes vmbus_close(): |
| 548 | 548 | * here we should skip most of the below cleanup work. |
| 549 | 549 | */ |
| @@ -239,7 +239,7 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode) · 238 unmodified lines | ||
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | } else { |
| 242 | − // Disble B channel interrupts | |
| 242 | + // Disable B channel interrupts | |
| 243 | 243 | st5481_usb_device_ctrl_msg(adapter, FFMSK_B1+(bcs->channel * 2), 0, NULL, NULL); |
| 244 | 244 | |
| 245 | 245 | // Disable B channel FIFOs |
| @@ -4,7 +4,6 @@ · 3 unmodified lines | ||
| 4 | 4 | |
| 5 | 5 | #include <linux/blkdev.h> |
| 6 | 6 | #include <linux/errno.h> |
| 7 | −#include <linux/blkdev.h> | |
| 8 | 7 | #include <linux/kernel.h> |
| 9 | 8 | #include <linux/sched/clock.h> |
| 10 | 9 | #include <linux/llist.h> |
| @@ -256,8 +256,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, · 255 unmodified lines | ||
| 256 | 256 | * |
| 257 | 257 | * The actual DAP implementation may be restricted to only one of the modes. |
| 258 | 258 | * A compiler warning or error will be generated if the DAP implementation |
| 259 | −* overides or cannot handle the mode defined below. | |
| 260 | −* | |
| 259 | +* overrides or cannot handle the mode defined below. | |
| 261 | 260 | */ |
| 262 | 261 | #ifndef DRXDAP_SINGLE_MASTER |
| 263 | 262 | #define DRXDAP_SINGLE_MASTER 1 |
| @@ -272,7 +271,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, · 8 unmodified lines | ||
| 272 | 271 | * |
| 273 | 272 | * This maximum size may be restricted by the actual DAP implementation. |
| 274 | 273 | * A compiler warning or error will be generated if the DAP implementation |
| 275 | −* overides or cannot handle the chunksize defined below. | |
| 274 | +* overrides or cannot handle the chunksize defined below. | |
| 276 | 275 | * |
| 277 | 276 | * Beware that the DAP uses DRXDAP_MAX_WCHUNKSIZE to create a temporary data |
| 278 | 277 | * buffer. Do not undefine or choose too large, unless your system is able to |
| @@ -292,8 +291,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, · 13 unmodified lines | ||
| 292 | 291 | * |
| 293 | 292 | * This maximum size may be restricted by the actual DAP implementation. |
| 294 | 293 | * A compiler warning or error will be generated if the DAP implementation |
| 295 | −* overides or cannot handle the chunksize defined below. | |
| 296 | −* | |
| 294 | +* overrides or cannot handle the chunksize defined below. | |
| 297 | 295 | */ |
| 298 | 296 | #ifndef DRXDAP_MAX_RCHUNKSIZE |
| 299 | 297 | #define DRXDAP_MAX_RCHUNKSIZE 60 |
| @@ -186,7 +186,7 @@ static inline int write_enable(struct spi_nor *nor) · 185 unmodified lines | ||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /* |
| 189 | − * Send write disble instruction to the chip. | |
| 189 | + * Send write disable instruction to the chip. | |
| 190 | 190 | */ |
| 191 | 191 | static inline int write_disable(struct spi_nor *nor) |
| 192 | 192 | { |
| @@ -1162,8 +1162,8 @@ struct ob_mac_tso_iocb_rsp { · 1161 unmodified lines | ||
| 1162 | 1162 | struct ib_mac_iocb_rsp { |
| 1163 | 1163 | u8 opcode; /* 0x20 */ |
| 1164 | 1164 | u8 flags1; |
| 1165 | −#define IB_MAC_IOCB_RSP_OI 0x01 /* Overide intr delay */ | |
| 1166 | −#define IB_MAC_IOCB_RSP_I 0x02 /* Disble Intr Generation */ | |
| 1165 | +#define IB_MAC_IOCB_RSP_OI 0x01 /* Override intr delay */ | |
| 1166 | +#define IB_MAC_IOCB_RSP_I 0x02 /* Disable Intr Generation */ | |
| 1167 | 1167 | #define IB_MAC_CSUM_ERR_MASK 0x1c /* A mask to use for csum errs */ |
| 1168 | 1168 | #define IB_MAC_IOCB_RSP_TE 0x04 /* Checksum error */ |
| 1169 | 1169 | #define IB_MAC_IOCB_RSP_NU 0x08 /* No checksum rcvd */ |
| @@ -6278,7 +6278,7 @@ ahd_reset(struct ahd_softc *ahd, int reinit) · 6277 unmodified lines | ||
| 6278 | 6278 | * does not disable its parity logic prior to |
| 6279 | 6279 | * the start of the reset. This may cause a |
| 6280 | 6280 | * parity error to be detected and thus a |
| 6281 | − * spurious SERR or PERR assertion. Disble | |
| 6281 | + * spurious SERR or PERR assertion. Disable | |
| 6282 | 6282 | * PERR and SERR responses during the CHIPRST. |
| 6283 | 6283 | */ |
| 6284 | 6284 | mod_cmd = cmd & ~(PCIM_CMD_PERRESPEN|PCIM_CMD_SERRESPEN); |
| @@ -84,8 +84,7 @@ static int ep_open(struct inode *, struct file *); · 83 unmodified lines | ||
| 84 | 84 | |
| 85 | 85 | /* /dev/gadget/$CHIP represents ep0 and the whole device */ |
| 86 | 86 | enum ep0_state { |
| 87 | − /* DISBLED is the initial state. | |
| 88 | − */ | |
| 87 | + /* DISABLED is the initial state. */ | |
| 89 | 88 | STATE_DEV_DISABLED = 0, |
| 90 | 89 | |
| 91 | 90 | /* Only one open() of /dev/gadget/$CHIP; only one file tracks |
| @@ -868,7 +868,7 @@ static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci) · 867 unmodified lines | ||
| 868 | 868 | |
| 869 | 869 | spin_lock_irqsave(&xhci->lock, flags); |
| 870 | 870 | |
| 871 | − /* disble usb3 ports Wake bits*/ | |
| 871 | + /* disable usb3 ports Wake bits */ | |
| 872 | 872 | port_index = xhci->num_usb3_ports; |
| 873 | 873 | port_array = xhci->usb3_ports; |
| 874 | 874 | while (port_index--) { |
| @@ -879,7 +879,7 @@ static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci) · 4 unmodified lines | ||
| 879 | 879 | writel(t2, port_array[port_index]); |
| 880 | 880 | } |
| 881 | 881 | |
| 882 | − /* disble usb2 ports Wake bits*/ | |
| 882 | + /* disable usb2 ports Wake bits */ | |
| 883 | 883 | port_index = xhci->num_usb2_ports; |
| 884 | 884 | port_array = xhci->usb2_ports; |
| 885 | 885 | while (port_index--) { |
| @@ -1359,6 +1359,16 @@ out: · 1358 unmodified lines | ||
| 1359 | 1359 | return 0; |
| 1360 | 1360 | } |
| 1361 | 1361 | |
| 1362 | +static void fat_dummy_inode_init(struct inode *inode) | |
| 1363 | +{ | |
| 1364 | + /* Initialize this dummy inode to work as no-op. */ | |
| 1365 | + MSDOS_I(inode)->mmu_private = 0; | |
| 1366 | + MSDOS_I(inode)->i_start = 0; | |
| 1367 | + MSDOS_I(inode)->i_logstart = 0; | |
| 1368 | + MSDOS_I(inode)->i_attrs = 0; | |
| 1369 | + MSDOS_I(inode)->i_pos = 0; | |
| 1370 | +} | |
| 1371 | + | |
| 1362 | 1372 | static int fat_read_root(struct inode *inode) |
| 1363 | 1373 | { |
| 1364 | 1374 | struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); |
| @@ -1803,12 +1813,13 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, · 438 unmodified lines | ||
| 1803 | 1813 | fat_inode = new_inode(sb); |
| 1804 | 1814 | if (!fat_inode) |
| 1805 | 1815 | goto out_fail; |
| 1806 | − MSDOS_I(fat_inode)->i_pos = 0; | |
| 1816 | + fat_dummy_inode_init(fat_inode); | |
| 1807 | 1817 | sbi->fat_inode = fat_inode; |
| 1808 | 1818 | |
| 1809 | 1819 | fsinfo_inode = new_inode(sb); |
| 1810 | 1820 | if (!fsinfo_inode) |
| 1811 | 1821 | goto out_fail; |
| 1822 | + fat_dummy_inode_init(fsinfo_inode); | |
| 1812 | 1823 | fsinfo_inode->i_ino = MSDOS_FSINFO_INO; |
| 1813 | 1824 | sbi->fsinfo_inode = fsinfo_inode; |
| 1814 | 1825 | insert_inode_hash(fsinfo_inode); |
| @@ -138,8 +138,6 @@ out: · 137 unmodified lines | ||
| 138 | 138 | * userfaultfd_ctx_get - Acquires a reference to the internal userfaultfd |
| 139 | 139 | * context. |
| 140 | 140 | * @ctx: [in] Pointer to the userfaultfd context. |
| 141 | − * | |
| 142 | − * Returns: In case of success, returns not zero. | |
| 143 | 141 | */ |
| 144 | 142 | static void userfaultfd_ctx_get(struct userfaultfd_ctx *ctx) |
| 145 | 143 | { |
| @@ -490,7 +488,7 @@ int handle_userfault(struct vm_fault *vmf, unsigned long reason) · 344 unmodified lines | ||
| 490 | 488 | * in such case. |
| 491 | 489 | */ |
| 492 | 490 | down_read(&mm->mmap_sem); |
| 493 | − ret = 0; | |
| 491 | + ret = VM_FAULT_NOPAGE; | |
| 494 | 492 | } |
| 495 | 493 | } |
| 496 | 494 | |
| @@ -527,10 +525,11 @@ out: · 30 unmodified lines | ||
| 527 | 525 | return ret; |
| 528 | 526 | } |
| 529 | 527 | |
| 530 | −static int userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, | |
| 531 | − struct userfaultfd_wait_queue *ewq) | |
| 528 | +static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, | |
| 529 | + struct userfaultfd_wait_queue *ewq) | |
| 532 | 530 | { |
| 533 | − int ret = 0; | |
| 531 | + if (WARN_ON_ONCE(current->flags & PF_EXITING)) | |
| 532 | + goto out; | |
| 534 | 533 | |
| 535 | 534 | ewq->ctx = ctx; |
| 536 | 535 | init_waitqueue_entry(&ewq->wq, current); |
| @@ -547,8 +546,16 @@ static int userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, · 10 unmodified lines | ||
| 547 | 546 | break; |
| 548 | 547 | if (ACCESS_ONCE(ctx->released) || |
| 549 | 548 | fatal_signal_pending(current)) { |
| 550 | − ret = -1; | |
| 551 | 549 | __remove_wait_queue(&ctx->event_wqh, &ewq->wq); |
| 550 | + if (ewq->msg.event == UFFD_EVENT_FORK) { | |
| 551 | + struct userfaultfd_ctx *new; | |
| 552 | + | |
| 553 | + new = (struct userfaultfd_ctx *) | |
| 554 | + (unsigned long) | |
| 555 | + ewq->msg.arg.reserved.reserved1; | |
| 556 | + | |
| 557 | + userfaultfd_ctx_put(new); | |
| 558 | + } | |
| 552 | 559 | break; |
| 553 | 560 | } |
| 554 | 561 | |
| @@ -566,9 +573,8 @@ static int userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, · 11 unmodified lines | ||
| 566 | 573 | * ctx may go away after this if the userfault pseudo fd is |
| 567 | 574 | * already released. |
| 568 | 575 | */ |
| 569 | − | |
| 576 | +out: | |
| 570 | 577 | userfaultfd_ctx_put(ctx); |
| 571 | − return ret; | |
| 572 | 578 | } |
| 573 | 579 | |
| 574 | 580 | static void userfaultfd_event_complete(struct userfaultfd_ctx *ctx, |
| @@ -626,7 +632,7 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs) · 51 unmodified lines | ||
| 626 | 632 | return 0; |
| 627 | 633 | } |
| 628 | 634 | |
| 629 | −static int dup_fctx(struct userfaultfd_fork_ctx *fctx) | |
| 635 | +static void dup_fctx(struct userfaultfd_fork_ctx *fctx) | |
| 630 | 636 | { |
| 631 | 637 | struct userfaultfd_ctx *ctx = fctx->orig; |
| 632 | 638 | struct userfaultfd_wait_queue ewq; |
| @@ -636,17 +642,15 @@ static int dup_fctx(struct userfaultfd_fork_ctx *fctx) · 3 unmodified lines | ||
| 636 | 642 | ewq.msg.event = UFFD_EVENT_FORK; |
| 637 | 643 | ewq.msg.arg.reserved.reserved1 = (unsigned long)fctx->new; |
| 638 | 644 | |
| 639 | − return userfaultfd_event_wait_completion(ctx, &ewq); | |
| 645 | + userfaultfd_event_wait_completion(ctx, &ewq); | |
| 640 | 646 | } |
| 641 | 647 | |
| 642 | 648 | void dup_userfaultfd_complete(struct list_head *fcs) |
| 643 | 649 | { |
| 644 | − int ret = 0; | |
| 645 | 650 | struct userfaultfd_fork_ctx *fctx, *n; |
| 646 | 651 | |
| 647 | 652 | list_for_each_entry_safe(fctx, n, fcs, list) { |
| 648 | − if (!ret) | |
| 649 | − ret = dup_fctx(fctx); | |
| 653 | + dup_fctx(fctx); | |
| 650 | 654 | list_del(&fctx->list); |
| 651 | 655 | kfree(fctx); |
| 652 | 656 | } |
| @@ -689,8 +693,7 @@ void mremap_userfaultfd_complete(struct vm_userfaultfd_ctx *vm_ctx, · 36 unmodified lines | ||
| 689 | 693 | userfaultfd_event_wait_completion(ctx, &ewq); |
| 690 | 694 | } |
| 691 | 695 | |
| 692 | −void userfaultfd_remove(struct vm_area_struct *vma, | |
| 693 | − struct vm_area_struct **prev, | |
| 696 | +bool userfaultfd_remove(struct vm_area_struct *vma, | |
| 694 | 697 | unsigned long start, unsigned long end) |
| 695 | 698 | { |
| 696 | 699 | struct mm_struct *mm = vma->vm_mm; |
| @@ -699,13 +702,11 @@ void userfaultfd_remove(struct vm_area_struct *vma, · 2 unmodified lines | ||
| 699 | 702 | |
| 700 | 703 | ctx = vma->vm_userfaultfd_ctx.ctx; |
| 701 | 704 | if (!ctx || !(ctx->features & UFFD_FEATURE_EVENT_REMOVE)) |
| 702 | − return; | |
| 705 | + return true; | |
| 703 | 706 | |
| 704 | 707 | userfaultfd_ctx_get(ctx); |
| 705 | 708 | up_read(&mm->mmap_sem); |
| 706 | 709 | |
| 707 | − *prev = NULL; /* We wait for ACK w/o the mmap semaphore */ | |
| 708 | − | |
| 709 | 710 | msg_init(&ewq.msg); |
| 710 | 711 | |
| 711 | 712 | ewq.msg.event = UFFD_EVENT_REMOVE; |
| @@ -714,7 +715,7 @@ void userfaultfd_remove(struct vm_area_struct *vma, · 2 unmodified lines | ||
| 714 | 715 | |
| 715 | 716 | userfaultfd_event_wait_completion(ctx, &ewq); |
| 716 | 717 | |
| 717 | − down_read(&mm->mmap_sem); | |
| 718 | + return false; | |
| 718 | 719 | } |
| 719 | 720 | |
| 720 | 721 | static bool has_unmap_ctx(struct userfaultfd_ctx *ctx, struct list_head *unmaps, |
| @@ -775,34 +776,6 @@ void userfaultfd_unmap_complete(struct mm_struct *mm, struct list_head *uf) · 54 unmodified lines | ||
| 775 | 776 | } |
| 776 | 777 | } |
| 777 | 778 | |
| 778 | −void userfaultfd_exit(struct mm_struct *mm) | |
| 779 | −{ | |
| 780 | − struct vm_area_struct *vma = mm->mmap; | |
| 781 | − | |
| 782 | − /* | |
| 783 | − * We can do the vma walk without locking because the caller | |
| 784 | − * (exit_mm) knows it now has exclusive access | |
| 785 | − */ | |
| 786 | − while (vma) { | |
| 787 | − struct userfaultfd_ctx *ctx = vma->vm_userfaultfd_ctx.ctx; | |
| 788 | − | |
| 789 | − if (ctx && (ctx->features & UFFD_FEATURE_EVENT_EXIT)) { | |
| 790 | − struct userfaultfd_wait_queue ewq; | |
| 791 | − | |
| 792 | − userfaultfd_ctx_get(ctx); | |
| 793 | − | |
| 794 | − msg_init(&ewq.msg); | |
| 795 | − ewq.msg.event = UFFD_EVENT_EXIT; | |
| 796 | − | |
| 797 | − userfaultfd_event_wait_completion(ctx, &ewq); | |
| 798 | − | |
| 799 | − ctx->features &= ~UFFD_FEATURE_EVENT_EXIT; | |
| 800 | − } | |
| 801 | − | |
| 802 | − vma = vma->vm_next; | |
| 803 | − } | |
| 804 | −} | |
| 805 | − | |
| 806 | 779 | static int userfaultfd_release(struct inode *inode, struct file *file) |
| 807 | 780 | { |
| 808 | 781 | struct userfaultfd_ctx *ctx = file->private_data; |
| @@ -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; |
| @@ -2669,7 +2669,7 @@ static bool css_visible(struct cgroup_subsys_state *css) · 2668 unmodified lines | ||
| 2669 | 2669 | * |
| 2670 | 2670 | * Returns 0 on success, -errno on failure. On failure, csses which have |
| 2671 | 2671 | * been processed already aren't cleaned up. The caller is responsible for |
| 2672 | − * cleaning up with cgroup_apply_control_disble(). | |
| 2672 | + * cleaning up with cgroup_apply_control_disable(). | |
| 2673 | 2673 | */ |
| 2674 | 2674 | static int cgroup_apply_control_enable(struct cgroup *cgrp) |
| 2675 | 2675 | { |
| @@ -998,7 +998,7 @@ list_update_cgroup_event(struct perf_event *event, · 997 unmodified lines | ||
| 998 | 998 | */ |
| 999 | 999 | #define PERF_CPU_HRTIMER (1000 / HZ) |
| 1000 | 1000 | /* |
| 1001 | − * function must be called with interrupts disbled | |
| 1001 | + * function must be called with interrupts disabled | |
| 1002 | 1002 | */ |
| 1003 | 1003 | static enum hrtimer_restart perf_mux_hrtimer_handler(struct hrtimer *hr) |
| 1004 | 1004 | { |
| @@ -554,7 +554,6 @@ static void exit_mm(void) · 553 unmodified lines | ||
| 554 | 554 | enter_lazy_tlb(mm, current); |
| 555 | 555 | task_unlock(current); |
| 556 | 556 | mm_update_next_owner(mm); |
| 557 | − userfaultfd_exit(mm); | |
| 558 | 557 | mmput(mm); |
| 559 | 558 | if (test_thread_flag(TIF_MEMDIE)) |
| 560 | 559 | exit_oom_victim(); |
| @@ -65,7 +65,7 @@ void stack_trace_print(void) · 64 unmodified lines | ||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /* |
| 68 | − * When arch-specific code overides this function, the following | |
| 68 | + * When arch-specific code overrides this function, the following | |
| 69 | 69 | * data should be filled up, assuming stack_trace_max_lock is held to |
| 70 | 70 | * prevent concurrent updates. |
| 71 | 71 | * stack_trace_index[] |
| @@ -1828,7 +1828,7 @@ static void __split_huge_pud_locked(struct vm_area_struct *vma, pud_t *pud, · 1827 unmodified lines | ||
| 1828 | 1828 | VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PUD_SIZE, vma); |
| 1829 | 1829 | VM_BUG_ON(!pud_trans_huge(*pud) && !pud_devmap(*pud)); |
| 1830 | 1830 | |
| 1831 | − count_vm_event(THP_SPLIT_PMD); | |
| 1831 | + count_vm_event(THP_SPLIT_PUD); | |
| 1832 | 1832 | |
| 1833 | 1833 | pudp_huge_clear_flush_notify(vma, haddr, pud); |
| 1834 | 1834 | } |
| @@ -25,6 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | #include <linux/printk.h> |
| 26 | 26 | #include <linux/shrinker.h> |
| 27 | 27 | #include <linux/slab.h> |
| 28 | +#include <linux/srcu.h> | |
| 28 | 29 | #include <linux/string.h> |
| 29 | 30 | #include <linux/types.h> |
| 30 | 31 | |
| @@ -103,6 +104,7 @@ static int quarantine_tail; · 72 unmodified lines | ||
| 103 | 104 | /* Total size of all objects in global_quarantine across all batches. */ |
| 104 | 105 | static unsigned long quarantine_size; |
| 105 | 106 | static DEFINE_SPINLOCK(quarantine_lock); |
| 107 | +DEFINE_STATIC_SRCU(remove_cache_srcu); | |
| 106 | 108 | |
| 107 | 109 | /* Maximum size of the global queue. */ |
| 108 | 110 | static unsigned long quarantine_max_size; |
| @@ -173,17 +175,22 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache) · 64 unmodified lines | ||
| 173 | 175 | struct qlist_head *q; |
| 174 | 176 | struct qlist_head temp = QLIST_INIT; |
| 175 | 177 | |
| 178 | + /* | |
| 179 | + * Note: irq must be disabled until after we move the batch to the | |
| 180 | + * global quarantine. Otherwise quarantine_remove_cache() can miss | |
| 181 | + * some objects belonging to the cache if they are in our local temp | |
| 182 | + * list. quarantine_remove_cache() executes on_each_cpu() at the | |
| 183 | + * beginning which ensures that it either sees the objects in per-cpu | |
| 184 | + * lists or in the global quarantine. | |
| 185 | + */ | |
| 176 | 186 | local_irq_save(flags); |
| 177 | 187 | |
| 178 | 188 | q = this_cpu_ptr(&cpu_quarantine); |
| 179 | 189 | qlist_put(q, &info->quarantine_link, cache->size); |
| 180 | − if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) | |
| 190 | + if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) { | |
| 181 | 191 | qlist_move_all(q, &temp); |
| 182 | 192 | |
| 183 | − local_irq_restore(flags); | |
| 184 | − | |
| 185 | − if (unlikely(!qlist_empty(&temp))) { | |
| 186 | − spin_lock_irqsave(&quarantine_lock, flags); | |
| 193 | + spin_lock(&quarantine_lock); | |
| 187 | 194 | WRITE_ONCE(quarantine_size, quarantine_size + temp.bytes); |
| 188 | 195 | qlist_move_all(&temp, &global_quarantine[quarantine_tail]); |
| 189 | 196 | if (global_quarantine[quarantine_tail].bytes >= |
| @@ -196,20 +203,33 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache) · 6 unmodified lines | ||
| 196 | 203 | if (new_tail != quarantine_head) |
| 197 | 204 | quarantine_tail = new_tail; |
| 198 | 205 | } |
| 199 | − spin_unlock_irqrestore(&quarantine_lock, flags); | |
| 206 | + spin_unlock(&quarantine_lock); | |
| 200 | 207 | } |
| 208 | + | |
| 209 | + local_irq_restore(flags); | |
| 201 | 210 | } |
| 202 | 211 | |
| 203 | 212 | void quarantine_reduce(void) |
| 204 | 213 | { |
| 205 | 214 | size_t total_size, new_quarantine_size, percpu_quarantines; |
| 206 | 215 | unsigned long flags; |
| 216 | + int srcu_idx; | |
| 207 | 217 | struct qlist_head to_free = QLIST_INIT; |
| 208 | 218 | |
| 209 | 219 | if (likely(READ_ONCE(quarantine_size) <= |
| 210 | 220 | READ_ONCE(quarantine_max_size))) |
| 211 | 221 | return; |
| 212 | 222 | |
| 223 | + /* | |
| 224 | + * srcu critical section ensures that quarantine_remove_cache() | |
| 225 | + * will not miss objects belonging to the cache while they are in our | |
| 226 | + * local to_free list. srcu is chosen because (1) it gives us private | |
| 227 | + * grace period domain that does not interfere with anything else, | |
| 228 | + * and (2) it allows synchronize_srcu() to return without waiting | |
| 229 | + * if there are no pending read critical sections (which is the | |
| 230 | + * expected case). | |
| 231 | + */ | |
| 232 | + srcu_idx = srcu_read_lock(&remove_cache_srcu); | |
| 213 | 233 | spin_lock_irqsave(&quarantine_lock, flags); |
| 214 | 234 | |
| 215 | 235 | /* |
| @@ -237,6 +257,7 @@ void quarantine_reduce(void) · 21 unmodified lines | ||
| 237 | 257 | spin_unlock_irqrestore(&quarantine_lock, flags); |
| 238 | 258 | |
| 239 | 259 | qlist_free_all(&to_free, NULL); |
| 260 | + srcu_read_unlock(&remove_cache_srcu, srcu_idx); | |
| 240 | 261 | } |
| 241 | 262 | |
| 242 | 263 | static void qlist_move_cache(struct qlist_head *from, |
| @@ -280,12 +301,28 @@ void quarantine_remove_cache(struct kmem_cache *cache) · 37 unmodified lines | ||
| 280 | 301 | unsigned long flags, i; |
| 281 | 302 | struct qlist_head to_free = QLIST_INIT; |
| 282 | 303 | |
| 304 | + /* | |
| 305 | + * Must be careful to not miss any objects that are being moved from | |
| 306 | + * per-cpu list to the global quarantine in quarantine_put(), | |
| 307 | + * nor objects being freed in quarantine_reduce(). on_each_cpu() | |
| 308 | + * achieves the first goal, while synchronize_srcu() achieves the | |
| 309 | + * second. | |
| 310 | + */ | |
| 283 | 311 | on_each_cpu(per_cpu_remove_cache, cache, 1); |
| 284 | 312 | |
| 285 | 313 | spin_lock_irqsave(&quarantine_lock, flags); |
| 286 | − for (i = 0; i < QUARANTINE_BATCHES; i++) | |
| 314 | + for (i = 0; i < QUARANTINE_BATCHES; i++) { | |
| 315 | + if (qlist_empty(&global_quarantine[i])) | |
| 316 | + continue; | |
| 287 | 317 | qlist_move_cache(&global_quarantine[i], &to_free, cache); |
| 318 | + /* Scanning whole quarantine can take a while. */ | |
| 319 | + spin_unlock_irqrestore(&quarantine_lock, flags); | |
| 320 | + cond_resched(); | |
| 321 | + spin_lock_irqsave(&quarantine_lock, flags); | |
| 322 | + } | |
| 288 | 323 | spin_unlock_irqrestore(&quarantine_lock, flags); |
| 289 | 324 | |
| 290 | 325 | qlist_free_all(&to_free, cache); |
| 326 | + | |
| 327 | + synchronize_srcu(&remove_cache_srcu); | |
| 291 | 328 | } |
| @@ -513,7 +513,43 @@ static long madvise_dontneed(struct vm_area_struct *vma, · 512 unmodified lines | ||
| 513 | 513 | if (!can_madv_dontneed_vma(vma)) |
| 514 | 514 | return -EINVAL; |
| 515 | 515 | |
| 516 | − userfaultfd_remove(vma, prev, start, end); | |
| 516 | + if (!userfaultfd_remove(vma, start, end)) { | |
| 517 | + *prev = NULL; /* mmap_sem has been dropped, prev is stale */ | |
| 518 | + | |
| 519 | + down_read(¤t->mm->mmap_sem); | |
| 520 | + vma = find_vma(current->mm, start); | |
| 521 | + if (!vma) | |
| 522 | + return -ENOMEM; | |
| 523 | + if (start < vma->vm_start) { | |
| 524 | + /* | |
| 525 | + * This "vma" under revalidation is the one | |
| 526 | + * with the lowest vma->vm_start where start | |
| 527 | + * is also < vma->vm_end. If start < | |
| 528 | + * vma->vm_start it means an hole materialized | |
| 529 | + * in the user address space within the | |
| 530 | + * virtual range passed to MADV_DONTNEED. | |
| 531 | + */ | |
| 532 | + return -ENOMEM; | |
| 533 | + } | |
| 534 | + if (!can_madv_dontneed_vma(vma)) | |
| 535 | + return -EINVAL; | |
| 536 | + if (end > vma->vm_end) { | |
| 537 | + /* | |
| 538 | + * Don't fail if end > vma->vm_end. If the old | |
| 539 | + * vma was splitted while the mmap_sem was | |
| 540 | + * released the effect of the concurrent | |
| 541 | + * operation may not cause MADV_DONTNEED to | |
| 542 | + * have an undefined result. There may be an | |
| 543 | + * adjacent next vma that we'll walk | |
| 544 | + * next. userfaultfd_remove() will generate an | |
| 545 | + * UFFD_EVENT_REMOVE repetition on the | |
| 546 | + * end-vma->vm_end range, but the manager can | |
| 547 | + * handle a repetition fine. | |
| 548 | + */ | |
| 549 | + end = vma->vm_end; | |
| 550 | + } | |
| 551 | + VM_WARN_ON(start >= end); | |
| 552 | + } | |
| 517 | 553 | zap_page_range(vma, start, end - start); |
| 518 | 554 | return 0; |
| 519 | 555 | } |
| @@ -554,8 +590,10 @@ static long madvise_remove(struct vm_area_struct *vma, · 34 unmodified lines | ||
| 554 | 590 | * mmap_sem. |
| 555 | 591 | */ |
| 556 | 592 | get_file(f); |
| 557 | − userfaultfd_remove(vma, prev, start, end); | |
| 558 | − up_read(¤t->mm->mmap_sem); | |
| 593 | + if (userfaultfd_remove(vma, start, end)) { | |
| 594 | + /* mmap_sem was not released by userfaultfd_remove() */ | |
| 595 | + up_read(¤t->mm->mmap_sem); | |
| 596 | + } | |
| 559 | 597 | error = vfs_fallocate(f, |
| 560 | 598 | FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, |
| 561 | 599 | offset, end - start); |
| @@ -1118,7 +1118,10 @@ unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn, · 1117 unmodified lines | ||
| 1118 | 1118 | } |
| 1119 | 1119 | } while (left < right); |
| 1120 | 1120 | |
| 1121 | − return min(PHYS_PFN(type->regions[right].base), max_pfn); | |
| 1121 | + if (right == type->cnt) | |
| 1122 | + return max_pfn; | |
| 1123 | + else | |
| 1124 | + return min(PHYS_PFN(type->regions[right].base), max_pfn); | |
| 1122 | 1125 | } |
| 1123 | 1126 | |
| 1124 | 1127 | /** |
| @@ -466,6 +466,8 @@ static void mem_cgroup_update_tree(struct mem_cgroup *memcg, struct page *page) · 465 unmodified lines | ||
| 466 | 466 | struct mem_cgroup_tree_per_node *mctz; |
| 467 | 467 | |
| 468 | 468 | mctz = soft_limit_tree_from_page(page); |
| 469 | + if (!mctz) | |
| 470 | + return; | |
| 469 | 471 | /* |
| 470 | 472 | * Necessary to update all ancestors when hierarchy is used. |
| 471 | 473 | * because their event counter is not touched. |
| @@ -503,7 +505,8 @@ static void mem_cgroup_remove_from_trees(struct mem_cgroup *memcg) · 31 unmodified lines | ||
| 503 | 505 | for_each_node(nid) { |
| 504 | 506 | mz = mem_cgroup_nodeinfo(memcg, nid); |
| 505 | 507 | mctz = soft_limit_tree_node(nid); |
| 506 | − mem_cgroup_remove_exceeded(mz, mctz); | |
| 508 | + if (mctz) | |
| 509 | + mem_cgroup_remove_exceeded(mz, mctz); | |
| 507 | 510 | } |
| 508 | 511 | } |
| 509 | 512 | |
| @@ -2558,7 +2561,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, · 2048 unmodified lines | ||
| 2558 | 2561 | * is empty. Do it lockless to prevent lock bouncing. Races |
| 2559 | 2562 | * are acceptable as soft limit is best effort anyway. |
| 2560 | 2563 | */ |
| 2561 | − if (RB_EMPTY_ROOT(&mctz->rb_root)) | |
| 2564 | + if (!mctz || RB_EMPTY_ROOT(&mctz->rb_root)) | |
| 2562 | 2565 | return 0; |
| 2563 | 2566 | |
| 2564 | 2567 | /* |
| @@ -4135,17 +4138,22 @@ static void free_mem_cgroup_per_node_info(struct mem_cgroup *memcg, int node) · 1570 unmodified lines | ||
| 4135 | 4138 | kfree(memcg->nodeinfo[node]); |
| 4136 | 4139 | } |
| 4137 | 4140 | |
| 4138 | −static void mem_cgroup_free(struct mem_cgroup *memcg) | |
| 4141 | +static void __mem_cgroup_free(struct mem_cgroup *memcg) | |
| 4139 | 4142 | { |
| 4140 | 4143 | int node; |
| 4141 | 4144 | |
| 4142 | − memcg_wb_domain_exit(memcg); | |
| 4143 | 4145 | for_each_node(node) |
| 4144 | 4146 | free_mem_cgroup_per_node_info(memcg, node); |
| 4145 | 4147 | free_percpu(memcg->stat); |
| 4146 | 4148 | kfree(memcg); |
| 4147 | 4149 | } |
| 4148 | 4150 | |
| 4151 | +static void mem_cgroup_free(struct mem_cgroup *memcg) | |
| 4152 | +{ | |
| 4153 | + memcg_wb_domain_exit(memcg); | |
| 4154 | + __mem_cgroup_free(memcg); | |
| 4155 | +} | |
| 4156 | + | |
| 4149 | 4157 | static struct mem_cgroup *mem_cgroup_alloc(void) |
| 4150 | 4158 | { |
| 4151 | 4159 | struct mem_cgroup *memcg; |
| @@ -4196,7 +4204,7 @@ static struct mem_cgroup *mem_cgroup_alloc(void) · 44 unmodified lines | ||
| 4196 | 4204 | fail: |
| 4197 | 4205 | if (memcg->id.id > 0) |
| 4198 | 4206 | idr_remove(&mem_cgroup_idr, memcg->id.id); |
| 4199 | − mem_cgroup_free(memcg); | |
| 4207 | + __mem_cgroup_free(memcg); | |
| 4200 | 4208 | return NULL; |
| 4201 | 4209 | } |
| 4202 | 4210 | |
| @@ -442,7 +442,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma, · 441 unmodified lines | ||
| 442 | 442 | |
| 443 | 443 | while (start < end) { |
| 444 | 444 | struct page *page; |
| 445 | − unsigned int page_mask; | |
| 445 | + unsigned int page_mask = 0; | |
| 446 | 446 | unsigned long page_increm; |
| 447 | 447 | struct pagevec pvec; |
| 448 | 448 | struct zone *zone; |
| @@ -456,8 +456,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma, · 7 unmodified lines | ||
| 456 | 456 | * suits munlock very well (and if somehow an abnormal page |
| 457 | 457 | * has sneaked into the range, we won't oops here: great). |
| 458 | 458 | */ |
| 459 | − page = follow_page_mask(vma, start, FOLL_GET | FOLL_DUMP, | |
| 460 | − &page_mask); | |
| 459 | + page = follow_page(vma, start, FOLL_GET | FOLL_DUMP); | |
| 461 | 460 | |
| 462 | 461 | if (page && !IS_ERR(page)) { |
| 463 | 462 | if (PageTransTail(page)) { |
| @@ -468,8 +467,8 @@ void munlock_vma_pages_range(struct vm_area_struct *vma, · 4 unmodified lines | ||
| 468 | 467 | /* |
| 469 | 468 | * Any THP page found by follow_page_mask() may |
| 470 | 469 | * have gotten split before reaching |
| 471 | − * munlock_vma_page(), so we need to recompute | |
| 472 | − * the page_mask here. | |
| 470 | + * munlock_vma_page(), so we need to compute | |
| 471 | + * the page_mask here instead. | |
| 473 | 472 | */ |
| 474 | 473 | page_mask = munlock_vma_page(page); |
| 475 | 474 | unlock_page(page); |
| @@ -1316,12 +1316,6 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, · 1315 unmodified lines | ||
| 1316 | 1316 | } |
| 1317 | 1317 | |
| 1318 | 1318 | while (page_vma_mapped_walk(&pvmw)) { |
| 1319 | − subpage = page - page_to_pfn(page) + pte_pfn(*pvmw.pte); | |
| 1320 | − address = pvmw.address; | |
| 1321 | − | |
| 1322 | − /* Unexpected PMD-mapped THP? */ | |
| 1323 | − VM_BUG_ON_PAGE(!pvmw.pte, page); | |
| 1324 | − | |
| 1325 | 1319 | /* |
| 1326 | 1320 | * If the page is mlock()d, we cannot swap it out. |
| 1327 | 1321 | * If it's recently referenced (perhaps page_referenced |
| @@ -1345,6 +1339,13 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, · 17 unmodified lines | ||
| 1345 | 1339 | continue; |
| 1346 | 1340 | } |
| 1347 | 1341 | |
| 1342 | + /* Unexpected PMD-mapped THP? */ | |
| 1343 | + VM_BUG_ON_PAGE(!pvmw.pte, page); | |
| 1344 | + | |
| 1345 | + subpage = page - page_to_pfn(page) + pte_pfn(*pvmw.pte); | |
| 1346 | + address = pvmw.address; | |
| 1347 | + | |
| 1348 | + | |
| 1348 | 1349 | if (!(flags & TTU_IGNORE_ACCESS)) { |
| 1349 | 1350 | if (ptep_clear_flush_young_notify(vma, address, |
| 1350 | 1351 | pvmw.pte)) { |
| @@ -1065,6 +1065,9 @@ const char * const vmstat_text[] = { · 1064 unmodified lines | ||
| 1065 | 1065 | "thp_split_page_failed", |
| 1066 | 1066 | "thp_deferred_split_page", |
| 1067 | 1067 | "thp_split_pmd", |
| 1068 | +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD | |
| 1069 | + "thp_split_pud", | |
| 1070 | +#endif | |
| 1068 | 1071 | "thp_zero_page_alloc", |
| 1069 | 1072 | "thp_zero_page_alloc_failed", |
| 1070 | 1073 | #endif |
| @@ -372,6 +372,8 @@ disassocation||disassociation · 371 unmodified lines | ||
| 372 | 372 | disapear||disappear |
| 373 | 373 | disapeared||disappeared |
| 374 | 374 | disappared||disappeared |
| 375 | +disble||disable | |
| 376 | +disbled||disabled | |
| 375 | 377 | disconnet||disconnect |
| 376 | 378 | discontinous||discontinuous |
| 377 | 379 | dispertion||dispersion |
| @@ -732,6 +734,7 @@ oustanding||outstanding · 354 unmodified lines | ||
| 732 | 734 | overaall||overall |
| 733 | 735 | overhread||overhead |
| 734 | 736 | overlaping||overlapping |
| 737 | +overide||override | |
| 735 | 738 | overrided||overridden |
| 736 | 739 | overriden||overridden |
| 737 | 740 | overun||overrun |
| @@ -89,7 +89,7 @@ static void acp_reg_write(u32 val, void __iomem *acp_mmio, u32 reg) · 88 unmodified lines | ||
| 89 | 89 | writel(val, acp_mmio + (reg * 4)); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | −/* Configure a given dma channel parameters - enable/disble, | |
| 92 | +/* Configure a given dma channel parameters - enable/disable, | |
| 93 | 93 | * number of descriptors, priority |
| 94 | 94 | */ |
| 95 | 95 | static void config_acp_dma_channel(void __iomem *acp_mmio, u8 ch_num, |
| @@ -1387,7 +1387,7 @@ static bool pci_data_iowrite(u16 port, u32 mask, u32 val) · 1386 unmodified lines | ||
| 1387 | 1387 | /* Allow writing to any other BAR, or expansion ROM */ |
| 1388 | 1388 | iowrite(portoff, val, mask, &d->config_words[reg]); |
| 1389 | 1389 | return true; |
| 1390 | − /* We let them overide latency timer and cacheline size */ | |
| 1390 | + /* We let them override latency timer and cacheline size */ | |
| 1391 | 1391 | } else if (&d->config_words[reg] == (void *)&d->config.cacheline_size) { |
| 1392 | 1392 | /* Only let them change the first two fields. */ |
| 1393 | 1393 | if (mask == 0xFFFFFFFF) |
| @@ -132,7 +132,7 @@ else · 131 unmodified lines | ||
| 132 | 132 | Q = @ |
| 133 | 133 | endif |
| 134 | 134 | |
| 135 | −# Disable command line variables (CFLAGS) overide from top | |
| 135 | +# Disable command line variables (CFLAGS) override from top | |
| 136 | 136 | # level Makefile (perf), otherwise build Makefile will get |
| 137 | 137 | # the same command line setup. |
| 138 | 138 | MAKEOVERRIDES= |
| @@ -135,7 +135,7 @@ else · 134 unmodified lines | ||
| 135 | 135 | Q = @ |
| 136 | 136 | endif |
| 137 | 137 | |
| 138 | −# Disable command line variables (CFLAGS) overide from top | |
| 138 | +# Disable command line variables (CFLAGS) override from top | |
| 139 | 139 | # level Makefile (perf), otherwise build Makefile will get |
| 140 | 140 | # the same command line setup. |
| 141 | 141 | MAKEOVERRIDES= |
| @@ -140,7 +140,7 @@ struct pevent_plugin_option { · 139 unmodified lines | ||
| 140 | 140 | * struct pevent_plugin_option PEVENT_PLUGIN_OPTIONS[] = { |
| 141 | 141 | * { |
| 142 | 142 | * .name = "option-name", |
| 143 | − * .plugin_alias = "overide-file-name", (optional) | |
| 143 | + * .plugin_alias = "override-file-name", (optional) | |
| 144 | 144 | * .description = "description of option to show users", |
| 145 | 145 | * }, |
| 146 | 146 | * { |
| @@ -1,5 +1,9 @@ | ||
| 1 | 1 | # Makefile for vm selftests |
| 2 | 2 | |
| 3 | +ifndef OUTPUT | |
| 4 | + OUTPUT := $(shell pwd) | |
| 5 | +endif | |
| 6 | + | |
| 3 | 7 | CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) |
| 4 | 8 | LDLIBS = -lrt |
| 5 | 9 | TEST_GEN_FILES = compaction_test |