Pull in v5.1-rc6 to resolve two conflicts. One is in BFQ, in just a comment, and is trivial. The other one is a conflict due to a later fix in the bio multi-page work, and needs a bit more care. * tag 'v5.1-rc6': (770 commits) Linux 5.1-rc6 block: make sure that bvec length can't be overflow block: kill all_q_node in request_queue x86/cpu/intel: Lower the "ENERGY_PERF_BIAS: Set to normal" message's log priority coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping mm/kmemleak.c: fix unused-function warning init: initialize jump labels before command line option parsing kernel/watchdog_hld.c: hard lockup message should end with a newline kcov: improve CONFIG_ARCH_HAS_KCOV help text mm: fix inactive list balancing between NUMA nodes and cgroups mm/hotplug: treat CMA pages as unmovable proc: fixup proc-pid-vm test proc: fix map_files test on F29 mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock mm: swapoff: shmem_unuse() stop eviction without igrab() mm: swapoff: take notice of completion sooner mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES mm: swapoff: shmem_find_swap_entries() filter out other types slab: store tagged freelist for off-slab slabmgmt ...
Showing the changes to include/linux (26 of 777 files). Show all
Unified · Split
| @@ -120,19 +120,23 @@ static inline bool bio_full(struct bio *bio) · 119 unmodified lines | ||
| 120 | 120 | return bio->bi_vcnt >= bio->bi_max_vecs; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | −#define mp_bvec_for_each_segment(bv, bvl, i, iter_all) \ | |
| 124 | − for (bv = bvec_init_iter_all(&iter_all); \ | |
| 125 | − (iter_all.done < (bvl)->bv_len) && \ | |
| 126 | − (mp_bvec_next_segment((bvl), &iter_all), 1); \ | |
| 127 | − iter_all.done += bv->bv_len, i += 1) | |
| 123 | +static inline bool bio_next_segment(const struct bio *bio, | |
| 124 | + struct bvec_iter_all *iter) | |
| 125 | +{ | |
| 126 | + if (iter->idx >= bio->bi_vcnt) | |
| 127 | + return false; | |
| 128 | + | |
| 129 | + bvec_advance(&bio->bi_io_vec[iter->idx], iter); | |
| 130 | + return true; | |
| 131 | +} | |
| 128 | 132 | |
| 129 | 133 | /* |
| 130 | 134 | * drivers should _never_ use the all version - the bio may have been split |
| 131 | 135 | * before it got to the driver and the driver won't own all of it |
| 132 | 136 | */ |
| 133 | −#define bio_for_each_segment_all(bvl, bio, i, iter_all) \ | |
| 134 | − for (i = 0, iter_all.idx = 0; iter_all.idx < (bio)->bi_vcnt; iter_all.idx++) \ | |
| 135 | − mp_bvec_for_each_segment(bvl, &((bio)->bi_io_vec[iter_all.idx]), i, iter_all) | |
| 137 | +#define bio_for_each_segment_all(bvl, bio, i, iter) \ | |
| 138 | + for (i = 0, bvl = bvec_init_iter_all(&iter); \ | |
| 139 | + bio_next_segment((bio), &iter); i++) | |
| 136 | 140 | |
| 137 | 141 | static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter, |
| 138 | 142 | unsigned bytes) |
| @@ -34,41 +34,41 @@ static inline u32 __bitrev32(u32 x) · 33 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | #define __constant_bitrev32(x) \ |
| 36 | 36 | ({ \ |
| 37 | − u32 __x = x; \ | |
| 38 | − __x = (__x >> 16) | (__x << 16); \ | |
| 39 | − __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ | |
| 40 | − __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ | |
| 41 | − __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ | |
| 42 | − __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ | |
| 43 | − __x; \ | |
| 37 | + u32 ___x = x; \ | |
| 38 | + ___x = (___x >> 16) | (___x << 16); \ | |
| 39 | + ___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8); \ | |
| 40 | + ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ | |
| 41 | + ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ | |
| 42 | + ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ | |
| 43 | + ___x; \ | |
| 44 | 44 | }) |
| 45 | 45 | |
| 46 | 46 | #define __constant_bitrev16(x) \ |
| 47 | 47 | ({ \ |
| 48 | − u16 __x = x; \ | |
| 49 | − __x = (__x >> 8) | (__x << 8); \ | |
| 50 | − __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ | |
| 51 | − __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ | |
| 52 | − __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ | |
| 53 | − __x; \ | |
| 48 | + u16 ___x = x; \ | |
| 49 | + ___x = (___x >> 8) | (___x << 8); \ | |
| 50 | + ___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4); \ | |
| 51 | + ___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2); \ | |
| 52 | + ___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1); \ | |
| 53 | + ___x; \ | |
| 54 | 54 | }) |
| 55 | 55 | |
| 56 | 56 | #define __constant_bitrev8x4(x) \ |
| 57 | 57 | ({ \ |
| 58 | − u32 __x = x; \ | |
| 59 | − __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ | |
| 60 | − __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ | |
| 61 | − __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ | |
| 62 | − __x; \ | |
| 58 | + u32 ___x = x; \ | |
| 59 | + ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ | |
| 60 | + ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ | |
| 61 | + ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ | |
| 62 | + ___x; \ | |
| 63 | 63 | }) |
| 64 | 64 | |
| 65 | 65 | #define __constant_bitrev8(x) \ |
| 66 | 66 | ({ \ |
| 67 | − u8 __x = x; \ | |
| 68 | − __x = (__x >> 4) | (__x << 4); \ | |
| 69 | − __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ | |
| 70 | − __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ | |
| 71 | − __x; \ | |
| 67 | + u8 ___x = x; \ | |
| 68 | + ___x = (___x >> 4) | (___x << 4); \ | |
| 69 | + ___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2); \ | |
| 70 | + ___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1); \ | |
| 71 | + ___x; \ | |
| 72 | 72 | }) |
| 73 | 73 | |
| 74 | 74 | #define bitrev32(x) \ |
| @@ -302,6 +302,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list); · 301 unmodified lines | ||
| 302 | 302 | void blk_mq_kick_requeue_list(struct request_queue *q); |
| 303 | 303 | void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs); |
| 304 | 304 | bool blk_mq_complete_request(struct request *rq); |
| 305 | +void blk_mq_complete_request_sync(struct request *rq); | |
| 305 | 306 | bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list, |
| 306 | 307 | struct bio *bio); |
| 307 | 308 | bool blk_mq_queue_stopped(struct request_queue *q); |
| @@ -548,7 +548,6 @@ struct request_queue { · 547 unmodified lines | ||
| 548 | 548 | struct rcu_head rcu_head; |
| 549 | 549 | wait_queue_head_t mq_freeze_wq; |
| 550 | 550 | struct percpu_ref q_usage_counter; |
| 551 | − struct list_head all_q_node; | |
| 552 | 551 | |
| 553 | 552 | struct blk_mq_tag_set *tag_set; |
| 554 | 553 | struct list_head tag_set_list; |
| @@ -140,26 +140,38 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv, · 139 unmodified lines | ||
| 140 | 140 | |
| 141 | 141 | static inline struct bio_vec *bvec_init_iter_all(struct bvec_iter_all *iter_all) |
| 142 | 142 | { |
| 143 | − iter_all->bv.bv_page = NULL; | |
| 144 | 143 | iter_all->done = 0; |
| 144 | + iter_all->idx = 0; | |
| 145 | 145 | |
| 146 | 146 | return &iter_all->bv; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | −static inline void mp_bvec_next_segment(const struct bio_vec *bvec, | |
| 150 | − struct bvec_iter_all *iter_all) | |
| 149 | +static inline struct page *bvec_nth_page(struct page *page, int idx) | |
| 150 | +{ | |
| 151 | + return idx == 0 ? page : nth_page(page, idx); | |
| 152 | +} | |
| 153 | + | |
| 154 | +static inline void bvec_advance(const struct bio_vec *bvec, | |
| 155 | + struct bvec_iter_all *iter_all) | |
| 151 | 156 | { |
| 152 | 157 | struct bio_vec *bv = &iter_all->bv; |
| 153 | 158 | |
| 154 | − if (bv->bv_page) { | |
| 159 | + if (iter_all->done) { | |
| 155 | 160 | bv->bv_page++; |
| 156 | 161 | bv->bv_offset = 0; |
| 157 | 162 | } else { |
| 158 | − bv->bv_page = bvec->bv_page; | |
| 159 | − bv->bv_offset = bvec->bv_offset; | |
| 163 | + bv->bv_page = bvec_nth_page(bvec->bv_page, bvec->bv_offset / | |
| 164 | + PAGE_SIZE); | |
| 165 | + bv->bv_offset = bvec->bv_offset & ~PAGE_MASK; | |
| 160 | 166 | } |
| 161 | 167 | bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset, |
| 162 | 168 | bvec->bv_len - iter_all->done); |
| 169 | + iter_all->done += bv->bv_len; | |
| 170 | + | |
| 171 | + if (iter_all->done == bvec->bv_len) { | |
| 172 | + iter_all->idx++; | |
| 173 | + iter_all->done = 0; | |
| 174 | + } | |
| 163 | 175 | } |
| 164 | 176 | |
| 165 | 177 | /* |
| @@ -1611,7 +1611,12 @@ efi_status_t efi_setup_gop(efi_system_table_t *sys_table_arg, · 1610 unmodified lines | ||
| 1611 | 1611 | struct screen_info *si, efi_guid_t *proto, |
| 1612 | 1612 | unsigned long size); |
| 1613 | 1613 | |
| 1614 | −bool efi_runtime_disabled(void); | |
| 1614 | +#ifdef CONFIG_EFI | |
| 1615 | +extern bool efi_runtime_disabled(void); | |
| 1616 | +#else | |
| 1617 | +static inline bool efi_runtime_disabled(void) { return true; } | |
| 1618 | +#endif | |
| 1619 | + | |
| 1615 | 1620 | extern void efi_call_virt_check_flags(unsigned long flags, const char *call); |
| 1616 | 1621 | extern unsigned long efi_call_virt_save_flags(void); |
| 1617 | 1622 | |
| @@ -31,6 +31,7 @@ struct elevator_mq_ops { · 30 unmodified lines | ||
| 31 | 31 | void (*exit_sched)(struct elevator_queue *); |
| 32 | 32 | int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int); |
| 33 | 33 | void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); |
| 34 | + void (*depth_updated)(struct blk_mq_hw_ctx *); | |
| 34 | 35 | |
| 35 | 36 | bool (*allow_merge)(struct request_queue *, struct request *, struct bio *); |
| 36 | 37 | bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *); |
| @@ -158,6 +158,9 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset, · 157 unmodified lines | ||
| 158 | 158 | #define FMODE_OPENED ((__force fmode_t)0x80000) |
| 159 | 159 | #define FMODE_CREATED ((__force fmode_t)0x100000) |
| 160 | 160 | |
| 161 | +/* File is stream-like */ | |
| 162 | +#define FMODE_STREAM ((__force fmode_t)0x200000) | |
| 163 | + | |
| 161 | 164 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
| 162 | 165 | #define FMODE_NONOTIFY ((__force fmode_t)0x4000000) |
| 163 | 166 | |
| @@ -3074,6 +3077,7 @@ extern loff_t no_seek_end_llseek_size(struct file *, loff_t, int, loff_t); · 2910 unmodified lines | ||
| 3074 | 3077 | extern loff_t no_seek_end_llseek(struct file *, loff_t, int); |
| 3075 | 3078 | extern int generic_file_open(struct inode * inode, struct file * filp); |
| 3076 | 3079 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
| 3080 | +extern int stream_open(struct inode * inode, struct file * filp); | |
| 3077 | 3081 | |
| 3078 | 3082 | #ifdef CONFIG_BLOCK |
| 3079 | 3083 | typedef void (dio_submit_t)(struct bio *bio, struct inode *inode, |
| @@ -48,8 +48,8 @@ · 47 unmodified lines | ||
| 48 | 48 | |
| 49 | 49 | #define u64_to_user_ptr(x) ( \ |
| 50 | 50 | { \ |
| 51 | − typecheck(u64, x); \ | |
| 52 | − (void __user *)(uintptr_t)x; \ | |
| 51 | + typecheck(u64, (x)); \ | |
| 52 | + (void __user *)(uintptr_t)(x); \ | |
| 53 | 53 | } \ |
| 54 | 54 | ) |
| 55 | 55 | |
| @@ -173,6 +173,7 @@ struct kretprobe_instance { · 172 unmodified lines | ||
| 173 | 173 | struct kretprobe *rp; |
| 174 | 174 | kprobe_opcode_t *ret_addr; |
| 175 | 175 | struct task_struct *task; |
| 176 | + void *fp; | |
| 176 | 177 | char data[0]; |
| 177 | 178 | }; |
| 178 | 179 | |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | #include <linux/irqbypass.h> |
| 29 | 29 | #include <linux/swait.h> |
| 30 | 30 | #include <linux/refcount.h> |
| 31 | +#include <linux/nospec.h> | |
| 31 | 32 | #include <asm/signal.h> |
| 32 | 33 | |
| 33 | 34 | #include <linux/kvm.h> |
| @@ -513,10 +514,10 @@ static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx) · 479 unmodified lines | ||
| 513 | 514 | |
| 514 | 515 | static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) |
| 515 | 516 | { |
| 516 | − /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case | |
| 517 | − * the caller has read kvm->online_vcpus before (as is the case | |
| 518 | − * for kvm_for_each_vcpu, for example). | |
| 519 | − */ | |
| 517 | + int num_vcpus = atomic_read(&kvm->online_vcpus); | |
| 518 | + i = array_index_nospec(i, num_vcpus); | |
| 519 | + | |
| 520 | + /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu. */ | |
| 520 | 521 | smp_rmb(); |
| 521 | 522 | return kvm->vcpus[i]; |
| 522 | 523 | } |
| @@ -600,6 +601,7 @@ void kvm_put_kvm(struct kvm *kvm); · 77 unmodified lines | ||
| 600 | 601 | |
| 601 | 602 | static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id) |
| 602 | 603 | { |
| 604 | + as_id = array_index_nospec(as_id, KVM_ADDRESS_SPACE_NUM); | |
| 603 | 605 | return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu, |
| 604 | 606 | lockdep_is_held(&kvm->slots_lock) || |
| 605 | 607 | !refcount_read(&kvm->users_count)); |
| @@ -566,7 +566,10 @@ struct mem_cgroup *lock_page_memcg(struct page *page); · 565 unmodified lines | ||
| 566 | 566 | void __unlock_page_memcg(struct mem_cgroup *memcg); |
| 567 | 567 | void unlock_page_memcg(struct page *page); |
| 568 | 568 | |
| 569 | −/* idx can be of type enum memcg_stat_item or node_stat_item */ | |
| 569 | +/* | |
| 570 | + * idx can be of type enum memcg_stat_item or node_stat_item. | |
| 571 | + * Keep in sync with memcg_exact_page_state(). | |
| 572 | + */ | |
| 570 | 573 | static inline unsigned long memcg_page_state(struct mem_cgroup *memcg, |
| 571 | 574 | int idx) |
| 572 | 575 | { |
| @@ -469,7 +469,7 @@ static inline u32 linkmode_adv_to_lcl_adv_t(unsigned long *advertising) · 468 unmodified lines | ||
| 469 | 469 | if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, |
| 470 | 470 | advertising)) |
| 471 | 471 | lcl_adv |= ADVERTISE_PAUSE_CAP; |
| 472 | − if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, | |
| 472 | + if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, | |
| 473 | 473 | advertising)) |
| 474 | 474 | lcl_adv |= ADVERTISE_PAUSE_ASYM; |
| 475 | 475 | |
| @@ -594,6 +594,8 @@ enum mlx5_pagefault_type_flags { · 593 unmodified lines | ||
| 594 | 594 | }; |
| 595 | 595 | |
| 596 | 596 | struct mlx5_td { |
| 597 | + /* protects tirs list changes while tirs refresh */ | |
| 598 | + struct mutex list_lock; | |
| 597 | 599 | struct list_head tirs_list; |
| 598 | 600 | u32 tdn; |
| 599 | 601 | }; |
| @@ -966,6 +966,10 @@ static inline bool is_pci_p2pdma_page(const struct page *page) · 965 unmodified lines | ||
| 966 | 966 | } |
| 967 | 967 | #endif /* CONFIG_DEV_PAGEMAP_OPS */ |
| 968 | 968 | |
| 969 | +/* 127: arbitrary random number, small enough to assemble well */ | |
| 970 | +#define page_ref_zero_or_close_to_overflow(page) \ | |
| 971 | + ((unsigned int) page_ref_count(page) + 127u <= 127u) | |
| 972 | + | |
| 969 | 973 | static inline void get_page(struct page *page) |
| 970 | 974 | { |
| 971 | 975 | page = compound_head(page); |
| @@ -973,8 +977,17 @@ static inline void get_page(struct page *page) · 1 unmodified line | ||
| 973 | 977 | * Getting a normal page or the head of a compound page |
| 974 | 978 | * requires to already have an elevated page->_refcount. |
| 975 | 979 | */ |
| 976 | − VM_BUG_ON_PAGE(page_ref_count(page) <= 0, page); | |
| 980 | + VM_BUG_ON_PAGE(page_ref_zero_or_close_to_overflow(page), page); | |
| 981 | + page_ref_inc(page); | |
| 982 | +} | |
| 983 | + | |
| 984 | +static inline __must_check bool try_get_page(struct page *page) | |
| 985 | +{ | |
| 986 | + page = compound_head(page); | |
| 987 | + if (WARN_ON_ONCE(page_ref_count(page) <= 0)) | |
| 988 | + return false; | |
| 977 | 989 | page_ref_inc(page); |
| 990 | + return true; | |
| 978 | 991 | } |
| 979 | 992 | |
| 980 | 993 | static inline void put_page(struct page *page) |
| @@ -671,7 +671,7 @@ enum vm_fault_reason { · 670 unmodified lines | ||
| 671 | 671 | |
| 672 | 672 | /* Encode hstate index for a hwpoisoned large page */ |
| 673 | 673 | #define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16)) |
| 674 | −#define VM_FAULT_GET_HINDEX(x) (((x) >> 16) & 0xf) | |
| 674 | +#define VM_FAULT_GET_HINDEX(x) (((__force unsigned int)(x) >> 16) & 0xf) | |
| 675 | 675 | |
| 676 | 676 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \ |
| 677 | 677 | VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \ |
| @@ -1500,6 +1500,7 @@ struct net_device_ops { · 1499 unmodified lines | ||
| 1500 | 1500 | * @IFF_FAILOVER: device is a failover master device |
| 1501 | 1501 | * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device |
| 1502 | 1502 | * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device |
| 1503 | + * @IFF_LIVE_RENAME_OK: rename is allowed while device is up and running | |
| 1503 | 1504 | */ |
| 1504 | 1505 | enum netdev_priv_flags { |
| 1505 | 1506 | IFF_802_1Q_VLAN = 1<<0, |
| @@ -1532,6 +1533,7 @@ enum netdev_priv_flags { · 26 unmodified lines | ||
| 1532 | 1533 | IFF_FAILOVER = 1<<27, |
| 1533 | 1534 | IFF_FAILOVER_SLAVE = 1<<28, |
| 1534 | 1535 | IFF_L3MDEV_RX_HANDLER = 1<<29, |
| 1536 | + IFF_LIVE_RENAME_OK = 1<<30, | |
| 1535 | 1537 | }; |
| 1536 | 1538 | |
| 1537 | 1539 | #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN |
| @@ -1563,6 +1565,7 @@ enum netdev_priv_flags { · 25 unmodified lines | ||
| 1563 | 1565 | #define IFF_FAILOVER IFF_FAILOVER |
| 1564 | 1566 | #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE |
| 1565 | 1567 | #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER |
| 1568 | +#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK | |
| 1566 | 1569 | |
| 1567 | 1570 | /** |
| 1568 | 1571 | * struct net_device - The DEVICE structure. |
| @@ -967,8 +967,13 @@ struct nvme_get_log_page_command { · 966 unmodified lines | ||
| 967 | 967 | __le16 numdl; |
| 968 | 968 | __le16 numdu; |
| 969 | 969 | __u16 rsvd11; |
| 970 | − __le32 lpol; | |
| 971 | − __le32 lpou; | |
| 970 | + union { | |
| 971 | + struct { | |
| 972 | + __le32 lpol; | |
| 973 | + __le32 lpou; | |
| 974 | + }; | |
| 975 | + __le64 lpo; | |
| 976 | + }; | |
| 972 | 977 | __u32 rsvd14[2]; |
| 973 | 978 | }; |
| 974 | 979 | |
| @@ -101,18 +101,20 @@ struct pipe_buf_operations { · 100 unmodified lines | ||
| 101 | 101 | /* |
| 102 | 102 | * Get a reference to the pipe buffer. |
| 103 | 103 | */ |
| 104 | − void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | |
| 104 | + bool (*get)(struct pipe_inode_info *, struct pipe_buffer *); | |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * pipe_buf_get - get a reference to a pipe_buffer |
| 109 | 109 | * @pipe: the pipe that the buffer belongs to |
| 110 | 110 | * @buf: the buffer to get a reference to |
| 111 | + * | |
| 112 | + * Return: %true if the reference was successfully obtained. | |
| 111 | 113 | */ |
| 112 | −static inline void pipe_buf_get(struct pipe_inode_info *pipe, | |
| 114 | +static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe, | |
| 113 | 115 | struct pipe_buffer *buf) |
| 114 | 116 | { |
| 115 | − buf->ops->get(pipe, buf); | |
| 117 | + return buf->ops->get(pipe, buf); | |
| 116 | 118 | } |
| 117 | 119 | |
| 118 | 120 | /** |
| @@ -171,7 +173,7 @@ struct pipe_inode_info *alloc_pipe_info(void); · 52 unmodified lines | ||
| 171 | 173 | void free_pipe_info(struct pipe_inode_info *); |
| 172 | 174 | |
| 173 | 175 | /* Generic pipe buffer ops functions */ |
| 174 | −void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | |
| 176 | +bool generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | |
| 175 | 177 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); |
| 176 | 178 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
| 177 | 179 | void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); |
| @@ -35,10 +35,13 @@ struct pmc_clk { · 34 unmodified lines | ||
| 35 | 35 | * |
| 36 | 36 | * @base: PMC clock register base offset |
| 37 | 37 | * @clks: pointer to set of registered clocks, typically 0..5 |
| 38 | + * @critical: flag to indicate if firmware enabled pmc_plt_clks | |
| 39 | + * should be marked as critial or not | |
| 38 | 40 | */ |
| 39 | 41 | struct pmc_clk_data { |
| 40 | 42 | void __iomem *base; |
| 41 | 43 | const struct pmc_clk *clks; |
| 44 | + bool critical; | |
| 42 | 45 | }; |
| 43 | 46 | |
| 44 | 47 | #endif /* __PLATFORM_DATA_X86_CLK_PMC_ATOM_H */ |
| @@ -9,6 +9,13 @@ · 8 unmodified lines | ||
| 9 | 9 | #include <linux/bug.h> /* For BUG_ON. */ |
| 10 | 10 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ |
| 11 | 11 | #include <uapi/linux/ptrace.h> |
| 12 | +#include <linux/seccomp.h> | |
| 13 | + | |
| 14 | +/* Add sp to seccomp_data, as seccomp is user API, we don't want to modify it */ | |
| 15 | +struct syscall_info { | |
| 16 | + __u64 sp; | |
| 17 | + struct seccomp_data data; | |
| 18 | +}; | |
| 12 | 19 | |
| 13 | 20 | extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, |
| 14 | 21 | void *buf, int len, unsigned int gup_flags); |
| @@ -407,9 +414,7 @@ static inline void user_single_step_report(struct pt_regs *regs) · 392 unmodified lines | ||
| 407 | 414 | #define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) |
| 408 | 415 | #endif |
| 409 | 416 | |
| 410 | −extern int task_current_syscall(struct task_struct *target, long *callno, | |
| 411 | − unsigned long args[6], unsigned int maxargs, | |
| 412 | − unsigned long *sp, unsigned long *pc); | |
| 417 | +extern int task_current_syscall(struct task_struct *target, struct syscall_info *info); | |
| 413 | 418 | |
| 414 | 419 | extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact); |
| 415 | 420 | #endif |
| @@ -49,6 +49,27 @@ static inline void mmdrop(struct mm_struct *mm) · 48 unmodified lines | ||
| 49 | 49 | __mmdrop(mm); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | +/* | |
| 53 | + * This has to be called after a get_task_mm()/mmget_not_zero() | |
| 54 | + * followed by taking the mmap_sem for writing before modifying the | |
| 55 | + * vmas or anything the coredump pretends not to change from under it. | |
| 56 | + * | |
| 57 | + * NOTE: find_extend_vma() called from GUP context is the only place | |
| 58 | + * that can modify the "mm" (notably the vm_start/end) under mmap_sem | |
| 59 | + * for reading and outside the context of the process, so it is also | |
| 60 | + * the only case that holds the mmap_sem for reading that must call | |
| 61 | + * this function. Generally if the mmap_sem is hold for reading | |
| 62 | + * there's no need of this check after get_task_mm()/mmget_not_zero(). | |
| 63 | + * | |
| 64 | + * This function can be obsoleted and the check can be removed, after | |
| 65 | + * the coredump code will hold the mmap_sem for writing before | |
| 66 | + * invoking the ->core_dump methods. | |
| 67 | + */ | |
| 68 | +static inline bool mmget_still_valid(struct mm_struct *mm) | |
| 69 | +{ | |
| 70 | + return likely(!mm->core_state); | |
| 71 | +} | |
| 72 | + | |
| 52 | 73 | /** |
| 53 | 74 | * mmget() - Pin the address space associated with a &struct mm_struct. |
| 54 | 75 | * @mm: The address space to pin. |
| @@ -21,6 +21,7 @@ struct shmem_inode_info { · 20 unmodified lines | ||
| 21 | 21 | struct list_head swaplist; /* chain of maybes on swap */ |
| 22 | 22 | struct shared_policy policy; /* NUMA memory alloc policy */ |
| 23 | 23 | struct simple_xattrs xattrs; /* list of xattrs */ |
| 24 | + atomic_t stop_eviction; /* hold when working on inode */ | |
| 24 | 25 | struct inode vfs_inode; |
| 25 | 26 | }; |
| 26 | 27 | |
| @@ -150,6 +150,9 @@ extern void * memscan(void *,int,__kernel_size_t); · 149 unmodified lines | ||
| 150 | 150 | #ifndef __HAVE_ARCH_MEMCMP |
| 151 | 151 | extern int memcmp(const void *,const void *,__kernel_size_t); |
| 152 | 152 | #endif |
| 153 | +#ifndef __HAVE_ARCH_BCMP | |
| 154 | +extern int bcmp(const void *,const void *,__kernel_size_t); | |
| 155 | +#endif | |
| 153 | 156 | #ifndef __HAVE_ARCH_MEMCHR |
| 154 | 157 | extern void * memchr(const void *,int,__kernel_size_t); |
| 155 | 158 | #endif |
| @@ -304,12 +304,4 @@ rpc_clnt_swap_deactivate(struct rpc_clnt *clnt) · 303 unmodified lines | ||
| 304 | 304 | } |
| 305 | 305 | #endif /* CONFIG_SUNRPC_SWAP */ |
| 306 | 306 | |
| 307 | −static inline bool | |
| 308 | −rpc_task_need_resched(const struct rpc_task *task) | |
| 309 | −{ | |
| 310 | − if (RPC_IS_QUEUED(task) || task->tk_callback) | |
| 311 | − return true; | |
| 312 | − return false; | |
| 313 | −} | |
| 314 | − | |
| 315 | 307 | #endif /* _LINUX_SUNRPC_SCHED_H_ */ |
| @@ -63,7 +63,7 @@ struct virtqueue; · 62 unmodified lines | ||
| 63 | 63 | /* |
| 64 | 64 | * Creates a virtqueue and allocates the descriptor ring. If |
| 65 | 65 | * may_reduce_num is set, then this may allocate a smaller ring than |
| 66 | − * expected. The caller should query virtqueue_get_ring_size to learn | |
| 66 | + * expected. The caller should query virtqueue_get_vring_size to learn | |
| 67 | 67 | * the actual size of the ring. |
| 68 | 68 | */ |
| 69 | 69 | struct virtqueue *vring_create_virtqueue(unsigned int index, |