diff options
| author | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
| commit | ee58b57100ca953da7320c285315a95db2f7053d (patch) | |
| tree | 77b815a31240adc4d6326346908137fc6c2c3a96 /include/linux | |
| parent | 6f30e8b022c8e3a722928ddb1a2ae0be852fcc0e (diff) | |
| parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
29 files changed, 135 insertions, 59 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 961a417d641e..e38e3fc13ea8 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <linux/ptrace.h> | 27 | #include <linux/ptrace.h> |
| 28 | #include <uapi/linux/audit.h> | 28 | #include <uapi/linux/audit.h> |
| 29 | #include <linux/tty.h> | ||
| 30 | 29 | ||
| 31 | #define AUDIT_INO_UNSET ((unsigned long)-1) | 30 | #define AUDIT_INO_UNSET ((unsigned long)-1) |
| 32 | #define AUDIT_DEV_UNSET ((dev_t)-1) | 31 | #define AUDIT_DEV_UNSET ((dev_t)-1) |
| @@ -348,23 +347,6 @@ static inline unsigned int audit_get_sessionid(struct task_struct *tsk) | |||
| 348 | return tsk->sessionid; | 347 | return tsk->sessionid; |
| 349 | } | 348 | } |
| 350 | 349 | ||
| 351 | static inline struct tty_struct *audit_get_tty(struct task_struct *tsk) | ||
| 352 | { | ||
| 353 | struct tty_struct *tty = NULL; | ||
| 354 | unsigned long flags; | ||
| 355 | |||
| 356 | spin_lock_irqsave(&tsk->sighand->siglock, flags); | ||
| 357 | if (tsk->signal) | ||
| 358 | tty = tty_kref_get(tsk->signal->tty); | ||
| 359 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); | ||
| 360 | return tty; | ||
| 361 | } | ||
| 362 | |||
| 363 | static inline void audit_put_tty(struct tty_struct *tty) | ||
| 364 | { | ||
| 365 | tty_kref_put(tty); | ||
| 366 | } | ||
| 367 | |||
| 368 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 350 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
| 369 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); | 351 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); |
| 370 | extern void __audit_bprm(struct linux_binprm *bprm); | 352 | extern void __audit_bprm(struct linux_binprm *bprm); |
| @@ -522,12 +504,6 @@ static inline unsigned int audit_get_sessionid(struct task_struct *tsk) | |||
| 522 | { | 504 | { |
| 523 | return -1; | 505 | return -1; |
| 524 | } | 506 | } |
| 525 | static inline struct tty_struct *audit_get_tty(struct task_struct *tsk) | ||
| 526 | { | ||
| 527 | return NULL; | ||
| 528 | } | ||
| 529 | static inline void audit_put_tty(struct tty_struct *tty) | ||
| 530 | { } | ||
| 531 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) | 507 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
| 532 | { } | 508 | { } |
| 533 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, | 509 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 9adfef694a25..8411032ac90d 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -115,6 +115,31 @@ enum bpf_access_type { | |||
| 115 | BPF_WRITE = 2 | 115 | BPF_WRITE = 2 |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | /* types of values stored in eBPF registers */ | ||
| 119 | enum bpf_reg_type { | ||
| 120 | NOT_INIT = 0, /* nothing was written into register */ | ||
| 121 | UNKNOWN_VALUE, /* reg doesn't contain a valid pointer */ | ||
| 122 | PTR_TO_CTX, /* reg points to bpf_context */ | ||
| 123 | CONST_PTR_TO_MAP, /* reg points to struct bpf_map */ | ||
| 124 | PTR_TO_MAP_VALUE, /* reg points to map element value */ | ||
| 125 | PTR_TO_MAP_VALUE_OR_NULL,/* points to map elem value or NULL */ | ||
| 126 | FRAME_PTR, /* reg == frame_pointer */ | ||
| 127 | PTR_TO_STACK, /* reg == frame_pointer + imm */ | ||
| 128 | CONST_IMM, /* constant integer value */ | ||
| 129 | |||
| 130 | /* PTR_TO_PACKET represents: | ||
| 131 | * skb->data | ||
| 132 | * skb->data + imm | ||
| 133 | * skb->data + (u16) var | ||
| 134 | * skb->data + (u16) var + imm | ||
| 135 | * if (range > 0) then [ptr, ptr + range - off) is safe to access | ||
| 136 | * if (id > 0) means that some 'var' was added | ||
| 137 | * if (off > 0) menas that 'imm' was added | ||
| 138 | */ | ||
| 139 | PTR_TO_PACKET, | ||
| 140 | PTR_TO_PACKET_END, /* skb->data + headlen */ | ||
| 141 | }; | ||
| 142 | |||
| 118 | struct bpf_prog; | 143 | struct bpf_prog; |
| 119 | 144 | ||
| 120 | struct bpf_verifier_ops { | 145 | struct bpf_verifier_ops { |
| @@ -124,7 +149,8 @@ struct bpf_verifier_ops { | |||
| 124 | /* return true if 'size' wide access at offset 'off' within bpf_context | 149 | /* return true if 'size' wide access at offset 'off' within bpf_context |
| 125 | * with 'type' (read or write) is allowed | 150 | * with 'type' (read or write) is allowed |
| 126 | */ | 151 | */ |
| 127 | bool (*is_valid_access)(int off, int size, enum bpf_access_type type); | 152 | bool (*is_valid_access)(int off, int size, enum bpf_access_type type, |
| 153 | enum bpf_reg_type *reg_type); | ||
| 128 | 154 | ||
| 129 | u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg, | 155 | u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg, |
| 130 | int src_reg, int ctx_off, | 156 | int src_reg, int ctx_off, |
| @@ -255,6 +281,10 @@ static inline struct bpf_prog *bpf_prog_get(u32 ufd) | |||
| 255 | static inline void bpf_prog_put(struct bpf_prog *prog) | 281 | static inline void bpf_prog_put(struct bpf_prog *prog) |
| 256 | { | 282 | { |
| 257 | } | 283 | } |
| 284 | |||
| 285 | static inline void bpf_prog_put_rcu(struct bpf_prog *prog) | ||
| 286 | { | ||
| 287 | } | ||
| 258 | #endif /* CONFIG_BPF_SYSCALL */ | 288 | #endif /* CONFIG_BPF_SYSCALL */ |
| 259 | 289 | ||
| 260 | /* verifier prototypes for helper functions called from eBPF programs */ | 290 | /* verifier prototypes for helper functions called from eBPF programs */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 484c8792da82..f53fa055021a 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -212,6 +212,7 @@ struct dentry_operations { | |||
| 212 | #define DCACHE_OP_REAL 0x08000000 | 212 | #define DCACHE_OP_REAL 0x08000000 |
| 213 | 213 | ||
| 214 | #define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */ | 214 | #define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */ |
| 215 | #define DCACHE_DENTRY_CURSOR 0x20000000 | ||
| 215 | 216 | ||
| 216 | extern seqlock_t rename_lock; | 217 | extern seqlock_t rename_lock; |
| 217 | 218 | ||
| @@ -575,5 +576,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, | |||
| 575 | return inode; | 576 | return inode; |
| 576 | } | 577 | } |
| 577 | 578 | ||
| 579 | /** | ||
| 580 | * d_real_inode - Return the real inode | ||
| 581 | * @dentry: The dentry to query | ||
| 582 | * | ||
| 583 | * If dentry is on an union/overlay, then return the underlying, real inode. | ||
| 584 | * Otherwise return d_inode(). | ||
| 585 | */ | ||
| 586 | static inline struct inode *d_real_inode(struct dentry *dentry) | ||
| 587 | { | ||
| 588 | return d_backing_inode(d_real(dentry)); | ||
| 589 | } | ||
| 590 | |||
| 578 | 591 | ||
| 579 | #endif /* __LINUX_DCACHE_H */ | 592 | #endif /* __LINUX_DCACHE_H */ |
diff --git a/include/linux/efi.h b/include/linux/efi.h index c2db3ca22217..f196dd0b0f2f 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -1005,7 +1005,7 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm, | |||
| 1005 | /* Iterate through an efi_memory_map */ | 1005 | /* Iterate through an efi_memory_map */ |
| 1006 | #define for_each_efi_memory_desc_in_map(m, md) \ | 1006 | #define for_each_efi_memory_desc_in_map(m, md) \ |
| 1007 | for ((md) = (m)->map; \ | 1007 | for ((md) = (m)->map; \ |
| 1008 | (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ | 1008 | ((void *)(md) + (m)->desc_size) <= (m)->map_end; \ |
| 1009 | (md) = (void *)(md) + (m)->desc_size) | 1009 | (md) = (void *)(md) + (m)->desc_size) |
| 1010 | 1010 | ||
| 1011 | /** | 1011 | /** |
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index d029ffac0d69..99403b19092f 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
| @@ -223,6 +223,8 @@ struct st_sensor_settings { | |||
| 223 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. | 223 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. |
| 224 | * @tf: Transfer function structure used by I/O operations. | 224 | * @tf: Transfer function structure used by I/O operations. |
| 225 | * @tb: Transfer buffers and mutex used by I/O operations. | 225 | * @tb: Transfer buffers and mutex used by I/O operations. |
| 226 | * @hw_irq_trigger: if we're using the hardware interrupt on the sensor. | ||
| 227 | * @hw_timestamp: Latest timestamp from the interrupt handler, when in use. | ||
| 226 | */ | 228 | */ |
| 227 | struct st_sensor_data { | 229 | struct st_sensor_data { |
| 228 | struct device *dev; | 230 | struct device *dev; |
| @@ -247,6 +249,9 @@ struct st_sensor_data { | |||
| 247 | 249 | ||
| 248 | const struct st_sensor_transfer_function *tf; | 250 | const struct st_sensor_transfer_function *tf; |
| 249 | struct st_sensor_transfer_buffer tb; | 251 | struct st_sensor_transfer_buffer tb; |
| 252 | |||
| 253 | bool hw_irq_trigger; | ||
| 254 | s64 hw_timestamp; | ||
| 250 | }; | 255 | }; |
| 251 | 256 | ||
| 252 | #ifdef CONFIG_IIO_BUFFER | 257 | #ifdef CONFIG_IIO_BUFFER |
| @@ -260,7 +265,8 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | |||
| 260 | const struct iio_trigger_ops *trigger_ops); | 265 | const struct iio_trigger_ops *trigger_ops); |
| 261 | 266 | ||
| 262 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); | 267 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); |
| 263 | 268 | int st_sensors_validate_device(struct iio_trigger *trig, | |
| 269 | struct iio_dev *indio_dev); | ||
| 264 | #else | 270 | #else |
| 265 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | 271 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, |
| 266 | const struct iio_trigger_ops *trigger_ops) | 272 | const struct iio_trigger_ops *trigger_ops) |
| @@ -271,6 +277,7 @@ static inline void st_sensors_deallocate_trigger(struct iio_dev *indio_dev) | |||
| 271 | { | 277 | { |
| 272 | return; | 278 | return; |
| 273 | } | 279 | } |
| 280 | #define st_sensors_validate_device NULL | ||
| 274 | #endif | 281 | #endif |
| 275 | 282 | ||
| 276 | int st_sensors_init_sensor(struct iio_dev *indio_dev, | 283 | int st_sensors_init_sensor(struct iio_dev *indio_dev, |
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index 7c27fa1030e8..feb04ea20f11 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -52,6 +52,12 @@ struct sock *inet_diag_find_one_icsk(struct net *net, | |||
| 52 | 52 | ||
| 53 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); | 53 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); |
| 54 | 54 | ||
| 55 | void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk); | ||
| 56 | |||
| 57 | int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb, | ||
| 58 | struct inet_diag_msg *r, int ext, | ||
| 59 | struct user_namespace *user_ns); | ||
| 60 | |||
| 55 | extern int inet_diag_register(const struct inet_diag_handler *handler); | 61 | extern int inet_diag_register(const struct inet_diag_handler *handler); |
| 56 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); | 62 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); |
| 57 | #endif /* _INET_DIAG_H_ */ | 63 | #endif /* _INET_DIAG_H_ */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index f2cb8d45513d..f8834f820ec2 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -190,7 +190,7 @@ extern struct task_group root_task_group; | |||
| 190 | #define INIT_TASK(tsk) \ | 190 | #define INIT_TASK(tsk) \ |
| 191 | { \ | 191 | { \ |
| 192 | .state = 0, \ | 192 | .state = 0, \ |
| 193 | .stack = &init_thread_info, \ | 193 | .stack = init_stack, \ |
| 194 | .usage = ATOMIC_INIT(2), \ | 194 | .usage = ATOMIC_INIT(2), \ |
| 195 | .flags = PF_KTHREAD, \ | 195 | .flags = PF_KTHREAD, \ |
| 196 | .prio = MAX_PRIO-20, \ | 196 | .prio = MAX_PRIO-20, \ |
diff --git a/include/linux/isa.h b/include/linux/isa.h index 5ab85281230b..f2d0258414cf 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #define __LINUX_ISA_H | 6 | #define __LINUX_ISA_H |
| 7 | 7 | ||
| 8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
| 9 | #include <linux/errno.h> | ||
| 9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 10 | 11 | ||
| 11 | struct isa_driver { | 12 | struct isa_driver { |
| @@ -22,13 +23,13 @@ struct isa_driver { | |||
| 22 | 23 | ||
| 23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) | 24 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) |
| 24 | 25 | ||
| 25 | #ifdef CONFIG_ISA | 26 | #ifdef CONFIG_ISA_BUS_API |
| 26 | int isa_register_driver(struct isa_driver *, unsigned int); | 27 | int isa_register_driver(struct isa_driver *, unsigned int); |
| 27 | void isa_unregister_driver(struct isa_driver *); | 28 | void isa_unregister_driver(struct isa_driver *); |
| 28 | #else | 29 | #else |
| 29 | static inline int isa_register_driver(struct isa_driver *d, unsigned int i) | 30 | static inline int isa_register_driver(struct isa_driver *d, unsigned int i) |
| 30 | { | 31 | { |
| 31 | return 0; | 32 | return -ENODEV; |
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | static inline void isa_unregister_driver(struct isa_driver *d) | 35 | static inline void isa_unregister_driver(struct isa_driver *d) |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 0536524bb9eb..68904469fba1 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
| @@ -117,13 +117,18 @@ struct module; | |||
| 117 | 117 | ||
| 118 | #include <linux/atomic.h> | 118 | #include <linux/atomic.h> |
| 119 | 119 | ||
| 120 | #ifdef HAVE_JUMP_LABEL | ||
| 121 | |||
| 120 | static inline int static_key_count(struct static_key *key) | 122 | static inline int static_key_count(struct static_key *key) |
| 121 | { | 123 | { |
| 122 | return atomic_read(&key->enabled); | 124 | /* |
| 125 | * -1 means the first static_key_slow_inc() is in progress. | ||
| 126 | * static_key_enabled() must return true, so return 1 here. | ||
| 127 | */ | ||
| 128 | int n = atomic_read(&key->enabled); | ||
| 129 | return n >= 0 ? n : 1; | ||
| 123 | } | 130 | } |
| 124 | 131 | ||
| 125 | #ifdef HAVE_JUMP_LABEL | ||
| 126 | |||
| 127 | #define JUMP_TYPE_FALSE 0UL | 132 | #define JUMP_TYPE_FALSE 0UL |
| 128 | #define JUMP_TYPE_TRUE 1UL | 133 | #define JUMP_TYPE_TRUE 1UL |
| 129 | #define JUMP_TYPE_MASK 1UL | 134 | #define JUMP_TYPE_MASK 1UL |
| @@ -162,6 +167,11 @@ extern void jump_label_apply_nops(struct module *mod); | |||
| 162 | 167 | ||
| 163 | #else /* !HAVE_JUMP_LABEL */ | 168 | #else /* !HAVE_JUMP_LABEL */ |
| 164 | 169 | ||
| 170 | static inline int static_key_count(struct static_key *key) | ||
| 171 | { | ||
| 172 | return atomic_read(&key->enabled); | ||
| 173 | } | ||
| 174 | |||
| 165 | static __always_inline void jump_label_init(void) | 175 | static __always_inline void jump_label_init(void) |
| 166 | { | 176 | { |
| 167 | static_key_initialized = true; | 177 | static_key_initialized = true; |
diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 611927f5870d..ac4b3c46a84d 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h | |||
| @@ -59,14 +59,13 @@ void kasan_poison_object_data(struct kmem_cache *cache, void *object); | |||
| 59 | 59 | ||
| 60 | void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags); | 60 | void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags); |
| 61 | void kasan_kfree_large(const void *ptr); | 61 | void kasan_kfree_large(const void *ptr); |
| 62 | void kasan_kfree(void *ptr); | 62 | void kasan_poison_kfree(void *ptr); |
| 63 | void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size, | 63 | void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size, |
| 64 | gfp_t flags); | 64 | gfp_t flags); |
| 65 | void kasan_krealloc(const void *object, size_t new_size, gfp_t flags); | 65 | void kasan_krealloc(const void *object, size_t new_size, gfp_t flags); |
| 66 | 66 | ||
| 67 | void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags); | 67 | void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags); |
| 68 | bool kasan_slab_free(struct kmem_cache *s, void *object); | 68 | bool kasan_slab_free(struct kmem_cache *s, void *object); |
| 69 | void kasan_poison_slab_free(struct kmem_cache *s, void *object); | ||
| 70 | 69 | ||
| 71 | struct kasan_cache { | 70 | struct kasan_cache { |
| 72 | int alloc_meta_offset; | 71 | int alloc_meta_offset; |
| @@ -76,6 +75,9 @@ struct kasan_cache { | |||
| 76 | int kasan_module_alloc(void *addr, size_t size); | 75 | int kasan_module_alloc(void *addr, size_t size); |
| 77 | void kasan_free_shadow(const struct vm_struct *vm); | 76 | void kasan_free_shadow(const struct vm_struct *vm); |
| 78 | 77 | ||
| 78 | size_t ksize(const void *); | ||
| 79 | static inline void kasan_unpoison_slab(const void *ptr) { ksize(ptr); } | ||
| 80 | |||
| 79 | #else /* CONFIG_KASAN */ | 81 | #else /* CONFIG_KASAN */ |
| 80 | 82 | ||
| 81 | static inline void kasan_unpoison_shadow(const void *address, size_t size) {} | 83 | static inline void kasan_unpoison_shadow(const void *address, size_t size) {} |
| @@ -102,7 +104,7 @@ static inline void kasan_poison_object_data(struct kmem_cache *cache, | |||
| 102 | 104 | ||
| 103 | static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {} | 105 | static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {} |
| 104 | static inline void kasan_kfree_large(const void *ptr) {} | 106 | static inline void kasan_kfree_large(const void *ptr) {} |
| 105 | static inline void kasan_kfree(void *ptr) {} | 107 | static inline void kasan_poison_kfree(void *ptr) {} |
| 106 | static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, | 108 | static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, |
| 107 | size_t size, gfp_t flags) {} | 109 | size_t size, gfp_t flags) {} |
| 108 | static inline void kasan_krealloc(const void *object, size_t new_size, | 110 | static inline void kasan_krealloc(const void *object, size_t new_size, |
| @@ -114,11 +116,12 @@ static inline bool kasan_slab_free(struct kmem_cache *s, void *object) | |||
| 114 | { | 116 | { |
| 115 | return false; | 117 | return false; |
| 116 | } | 118 | } |
| 117 | static inline void kasan_poison_slab_free(struct kmem_cache *s, void *object) {} | ||
| 118 | 119 | ||
| 119 | static inline int kasan_module_alloc(void *addr, size_t size) { return 0; } | 120 | static inline int kasan_module_alloc(void *addr, size_t size) { return 0; } |
| 120 | static inline void kasan_free_shadow(const struct vm_struct *vm) {} | 121 | static inline void kasan_free_shadow(const struct vm_struct *vm) {} |
| 121 | 122 | ||
| 123 | static inline void kasan_unpoison_slab(const void *ptr) { } | ||
| 124 | |||
| 122 | #endif /* CONFIG_KASAN */ | 125 | #endif /* CONFIG_KASAN */ |
| 123 | 126 | ||
| 124 | #endif /* LINUX_KASAN_H */ | 127 | #endif /* LINUX_KASAN_H */ |
diff --git a/include/linux/leds.h b/include/linux/leds.h index d2b13066e781..e5e7f2e80a54 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -42,15 +42,16 @@ struct led_classdev { | |||
| 42 | #define LED_UNREGISTERING (1 << 1) | 42 | #define LED_UNREGISTERING (1 << 1) |
| 43 | /* Upper 16 bits reflect control information */ | 43 | /* Upper 16 bits reflect control information */ |
| 44 | #define LED_CORE_SUSPENDRESUME (1 << 16) | 44 | #define LED_CORE_SUSPENDRESUME (1 << 16) |
| 45 | #define LED_BLINK_ONESHOT (1 << 17) | 45 | #define LED_BLINK_SW (1 << 17) |
| 46 | #define LED_BLINK_ONESHOT_STOP (1 << 18) | 46 | #define LED_BLINK_ONESHOT (1 << 18) |
| 47 | #define LED_BLINK_INVERT (1 << 19) | 47 | #define LED_BLINK_ONESHOT_STOP (1 << 19) |
| 48 | #define LED_BLINK_BRIGHTNESS_CHANGE (1 << 20) | 48 | #define LED_BLINK_INVERT (1 << 20) |
| 49 | #define LED_BLINK_DISABLE (1 << 21) | 49 | #define LED_BLINK_BRIGHTNESS_CHANGE (1 << 21) |
| 50 | #define LED_SYSFS_DISABLE (1 << 22) | 50 | #define LED_BLINK_DISABLE (1 << 22) |
| 51 | #define LED_DEV_CAP_FLASH (1 << 23) | 51 | #define LED_SYSFS_DISABLE (1 << 23) |
| 52 | #define LED_HW_PLUGGABLE (1 << 24) | 52 | #define LED_DEV_CAP_FLASH (1 << 24) |
| 53 | #define LED_PANIC_INDICATOR (1 << 25) | 53 | #define LED_HW_PLUGGABLE (1 << 25) |
| 54 | #define LED_PANIC_INDICATOR (1 << 26) | ||
| 54 | 55 | ||
| 55 | /* Set LED brightness level | 56 | /* Set LED brightness level |
| 56 | * Must not sleep. Use brightness_set_blocking for drivers | 57 | * Must not sleep. Use brightness_set_blocking for drivers |
| @@ -72,8 +73,8 @@ struct led_classdev { | |||
| 72 | * and if both are zero then a sensible default should be chosen. | 73 | * and if both are zero then a sensible default should be chosen. |
| 73 | * The call should adjust the timings in that case and if it can't | 74 | * The call should adjust the timings in that case and if it can't |
| 74 | * match the values specified exactly. | 75 | * match the values specified exactly. |
| 75 | * Deactivate blinking again when the brightness is set to a fixed | 76 | * Deactivate blinking again when the brightness is set to LED_OFF |
| 76 | * value via the brightness_set() callback. | 77 | * via the brightness_set() callback. |
| 77 | */ | 78 | */ |
| 78 | int (*blink_set)(struct led_classdev *led_cdev, | 79 | int (*blink_set)(struct led_classdev *led_cdev, |
| 79 | unsigned long *delay_on, | 80 | unsigned long *delay_on, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 4dbc1450bbe0..e6f6910278f3 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -466,6 +466,7 @@ enum { | |||
| 466 | enum { | 466 | enum { |
| 467 | MLX4_INTERFACE_STATE_UP = 1 << 0, | 467 | MLX4_INTERFACE_STATE_UP = 1 << 0, |
| 468 | MLX4_INTERFACE_STATE_DELETION = 1 << 1, | 468 | MLX4_INTERFACE_STATE_DELETION = 1 << 1, |
| 469 | MLX4_INTERFACE_STATE_SHUTDOWN = 1 << 2, | ||
| 469 | }; | 470 | }; |
| 470 | 471 | ||
| 471 | #define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ | 472 | #define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ |
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h index 266320feb160..ab310819ac36 100644 --- a/include/linux/mlx5/qp.h +++ b/include/linux/mlx5/qp.h | |||
| @@ -172,6 +172,7 @@ enum { | |||
| 172 | enum { | 172 | enum { |
| 173 | MLX5_FENCE_MODE_NONE = 0 << 5, | 173 | MLX5_FENCE_MODE_NONE = 0 << 5, |
| 174 | MLX5_FENCE_MODE_INITIATOR_SMALL = 1 << 5, | 174 | MLX5_FENCE_MODE_INITIATOR_SMALL = 1 << 5, |
| 175 | MLX5_FENCE_MODE_FENCE = 2 << 5, | ||
| 175 | MLX5_FENCE_MODE_STRONG_ORDERING = 3 << 5, | 176 | MLX5_FENCE_MODE_STRONG_ORDERING = 3 << 5, |
| 176 | MLX5_FENCE_MODE_SMALL_AND_FENCE = 4 << 5, | 177 | MLX5_FENCE_MODE_SMALL_AND_FENCE = 4 << 5, |
| 177 | }; | 178 | }; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5df5feb49575..ece042dfe23c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -602,7 +602,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | |||
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | void do_set_pte(struct vm_area_struct *vma, unsigned long address, | 604 | void do_set_pte(struct vm_area_struct *vma, unsigned long address, |
| 605 | struct page *page, pte_t *pte, bool write, bool anon, bool old); | 605 | struct page *page, pte_t *pte, bool write, bool anon); |
| 606 | #endif | 606 | #endif |
| 607 | 607 | ||
| 608 | /* | 608 | /* |
diff --git a/include/linux/net.h b/include/linux/net.h index 9aa49a05fe38..25aa03b51c4e 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -251,7 +251,8 @@ do { \ | |||
| 251 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 251 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
| 252 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | 252 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ |
| 253 | net_ratelimit()) \ | 253 | net_ratelimit()) \ |
| 254 | __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ | 254 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ |
| 255 | ##__VA_ARGS__); \ | ||
| 255 | } while (0) | 256 | } while (0) |
| 256 | #elif defined(DEBUG) | 257 | #elif defined(DEBUG) |
| 257 | #define net_dbg_ratelimited(fmt, ...) \ | 258 | #define net_dbg_ratelimited(fmt, ...) \ |
diff --git a/include/linux/of.h b/include/linux/of.h index c7292e8ea080..74eb28cadbef 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -614,7 +614,7 @@ static inline struct device_node *of_parse_phandle(const struct device_node *np, | |||
| 614 | return NULL; | 614 | return NULL; |
| 615 | } | 615 | } |
| 616 | 616 | ||
| 617 | static inline int of_parse_phandle_with_args(struct device_node *np, | 617 | static inline int of_parse_phandle_with_args(const struct device_node *np, |
| 618 | const char *list_name, | 618 | const char *list_name, |
| 619 | const char *cells_name, | 619 | const char *cells_name, |
| 620 | int index, | 620 | int index, |
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index f6e9e85164e8..b969e9443962 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h | |||
| @@ -8,7 +8,7 @@ struct pci_dev; | |||
| 8 | struct of_phandle_args; | 8 | struct of_phandle_args; |
| 9 | struct device_node; | 9 | struct device_node; |
| 10 | 10 | ||
| 11 | #ifdef CONFIG_OF | 11 | #ifdef CONFIG_OF_PCI |
| 12 | int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); | 12 | int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); |
| 13 | struct device_node *of_pci_find_child_device(struct device_node *parent, | 13 | struct device_node *of_pci_find_child_device(struct device_node *parent, |
| 14 | unsigned int devfn); | 14 | unsigned int devfn); |
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index ad2f67054372..c201060e0c6d 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h | |||
| @@ -31,6 +31,13 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); | |||
| 31 | int of_reserved_mem_device_init(struct device *dev); | 31 | int of_reserved_mem_device_init(struct device *dev); |
| 32 | void of_reserved_mem_device_release(struct device *dev); | 32 | void of_reserved_mem_device_release(struct device *dev); |
| 33 | 33 | ||
| 34 | int early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, | ||
| 35 | phys_addr_t align, | ||
| 36 | phys_addr_t start, | ||
| 37 | phys_addr_t end, | ||
| 38 | bool nomap, | ||
| 39 | phys_addr_t *res_base); | ||
| 40 | |||
| 34 | void fdt_init_reserved_mem(void); | 41 | void fdt_init_reserved_mem(void); |
| 35 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, | 42 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, |
| 36 | phys_addr_t base, phys_addr_t size); | 43 | phys_addr_t base, phys_addr_t size); |
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 17018f3c066e..908b67c847cd 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
| @@ -235,6 +235,9 @@ static inline int pwm_config(struct pwm_device *pwm, int duty_ns, | |||
| 235 | if (!pwm) | 235 | if (!pwm) |
| 236 | return -EINVAL; | 236 | return -EINVAL; |
| 237 | 237 | ||
| 238 | if (duty_ns < 0 || period_ns < 0) | ||
| 239 | return -EINVAL; | ||
| 240 | |||
| 238 | pwm_get_state(pwm, &state); | 241 | pwm_get_state(pwm, &state); |
| 239 | if (state.duty_cycle == duty_ns && state.period == period_ns) | 242 | if (state.duty_cycle == duty_ns && state.period == period_ns) |
| 240 | return 0; | 243 | return 0; |
diff --git a/include/linux/qed/qed_eth_if.h b/include/linux/qed/qed_eth_if.h index 71d523b4bc54..4475a9d8ae15 100644 --- a/include/linux/qed/qed_eth_if.h +++ b/include/linux/qed/qed_eth_if.h | |||
| @@ -49,6 +49,7 @@ struct qed_start_vport_params { | |||
| 49 | bool drop_ttl0; | 49 | bool drop_ttl0; |
| 50 | u8 vport_id; | 50 | u8 vport_id; |
| 51 | u16 mtu; | 51 | u16 mtu; |
| 52 | bool clear_stats; | ||
| 52 | }; | 53 | }; |
| 53 | 54 | ||
| 54 | struct qed_stop_rxq_params { | 55 | struct qed_stop_rxq_params { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6e42ada26345..253538f29ade 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -3007,7 +3007,7 @@ static inline int object_is_on_stack(void *obj) | |||
| 3007 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | 3007 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); |
| 3008 | } | 3008 | } |
| 3009 | 3009 | ||
| 3010 | extern void thread_info_cache_init(void); | 3010 | extern void thread_stack_cache_init(void); |
| 3011 | 3011 | ||
| 3012 | #ifdef CONFIG_DEBUG_STACK_USAGE | 3012 | #ifdef CONFIG_DEBUG_STACK_USAGE |
| 3013 | static inline unsigned long stack_not_used(struct task_struct *p) | 3013 | static inline unsigned long stack_not_used(struct task_struct *p) |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 7973a821ac58..ead97654c4e9 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
| @@ -277,7 +277,10 @@ static inline void raw_write_seqcount_barrier(seqcount_t *s) | |||
| 277 | 277 | ||
| 278 | static inline int raw_read_seqcount_latch(seqcount_t *s) | 278 | static inline int raw_read_seqcount_latch(seqcount_t *s) |
| 279 | { | 279 | { |
| 280 | return lockless_dereference(s)->sequence; | 280 | int seq = READ_ONCE(s->sequence); |
| 281 | /* Pairs with the first smp_wmb() in raw_write_seqcount_latch() */ | ||
| 282 | smp_read_barrier_depends(); | ||
| 283 | return seq; | ||
| 281 | } | 284 | } |
| 282 | 285 | ||
| 283 | /** | 286 | /** |
| @@ -331,7 +334,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s) | |||
| 331 | * unsigned seq, idx; | 334 | * unsigned seq, idx; |
| 332 | * | 335 | * |
| 333 | * do { | 336 | * do { |
| 334 | * seq = lockless_dereference(latch)->seq; | 337 | * seq = raw_read_seqcount_latch(&latch->seq); |
| 335 | * | 338 | * |
| 336 | * idx = seq & 0x01; | 339 | * idx = seq & 0x01; |
| 337 | * entry = data_query(latch->data[idx], ...); | 340 | * entry = data_query(latch->data[idx], ...); |
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h index 4018b48f2b3b..a0596ca0e80a 100644 --- a/include/linux/sock_diag.h +++ b/include/linux/sock_diag.h | |||
| @@ -36,6 +36,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk) | |||
| 36 | { | 36 | { |
| 37 | switch (sk->sk_family) { | 37 | switch (sk->sk_family) { |
| 38 | case AF_INET: | 38 | case AF_INET: |
| 39 | if (sk->sk_type == SOCK_RAW) | ||
| 40 | return SKNLGRP_NONE; | ||
| 41 | |||
| 39 | switch (sk->sk_protocol) { | 42 | switch (sk->sk_protocol) { |
| 40 | case IPPROTO_TCP: | 43 | case IPPROTO_TCP: |
| 41 | return SKNLGRP_INET_TCP_DESTROY; | 44 | return SKNLGRP_INET_TCP_DESTROY; |
| @@ -45,6 +48,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk) | |||
| 45 | return SKNLGRP_NONE; | 48 | return SKNLGRP_NONE; |
| 46 | } | 49 | } |
| 47 | case AF_INET6: | 50 | case AF_INET6: |
| 51 | if (sk->sk_type == SOCK_RAW) | ||
| 52 | return SKNLGRP_NONE; | ||
| 53 | |||
| 48 | switch (sk->sk_protocol) { | 54 | switch (sk->sk_protocol) { |
| 49 | case IPPROTO_TCP: | 55 | case IPPROTO_TCP: |
| 50 | return SKNLGRP_INET6_TCP_DESTROY; | 56 | return SKNLGRP_INET6_TCP_DESTROY; |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 19c659d1c0f8..b6810c92b8bb 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -137,8 +137,6 @@ struct rpc_create_args { | |||
| 137 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 137 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
| 138 | 138 | ||
| 139 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 139 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 140 | struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | ||
| 141 | struct rpc_xprt *xprt); | ||
| 142 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 140 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| 143 | const struct rpc_program *, u32); | 141 | const struct rpc_program *, u32); |
| 144 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 142 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index b7dabc4baafd..79ba50856707 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -84,6 +84,7 @@ struct svc_xprt { | |||
| 84 | 84 | ||
| 85 | struct net *xpt_net; | 85 | struct net *xpt_net; |
| 86 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ | 86 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ |
| 87 | struct rpc_xprt_switch *xpt_bc_xps; /* NFSv4.1 backchannel */ | ||
| 87 | }; | 88 | }; |
| 88 | 89 | ||
| 89 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 90 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 5aa3834619a8..5e3e1b63dbb3 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -297,6 +297,7 @@ struct xprt_create { | |||
| 297 | size_t addrlen; | 297 | size_t addrlen; |
| 298 | const char *servername; | 298 | const char *servername; |
| 299 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 299 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
| 300 | struct rpc_xprt_switch *bc_xps; | ||
| 300 | unsigned int flags; | 301 | unsigned int flags; |
| 301 | }; | 302 | }; |
| 302 | 303 | ||
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e45abe7db9a6..ee517bef0db0 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -335,6 +335,8 @@ struct thermal_genl_event { | |||
| 335 | * @get_trend: a pointer to a function that reads the sensor temperature trend. | 335 | * @get_trend: a pointer to a function that reads the sensor temperature trend. |
| 336 | * @set_emul_temp: a pointer to a function that sets sensor emulated | 336 | * @set_emul_temp: a pointer to a function that sets sensor emulated |
| 337 | * temperature. | 337 | * temperature. |
| 338 | * @set_trip_temp: a pointer to a function that sets the trip temperature on | ||
| 339 | * hardware. | ||
| 338 | */ | 340 | */ |
| 339 | struct thermal_zone_of_device_ops { | 341 | struct thermal_zone_of_device_ops { |
| 340 | int (*get_temp)(void *, int *); | 342 | int (*get_temp)(void *, int *); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 457651bf45b0..fefe8b06a63d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -1034,6 +1034,8 @@ static inline int usb_gadget_activate(struct usb_gadget *gadget) | |||
| 1034 | * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL, | 1034 | * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL, |
| 1035 | * this driver will be bound to any available UDC. | 1035 | * this driver will be bound to any available UDC. |
| 1036 | * @pending: UDC core private data used for deferred probe of this driver. | 1036 | * @pending: UDC core private data used for deferred probe of this driver. |
| 1037 | * @match_existing_only: If udc is not found, return an error and don't add this | ||
| 1038 | * gadget driver to list of pending driver | ||
| 1037 | * | 1039 | * |
| 1038 | * Devices are disabled till a gadget driver successfully bind()s, which | 1040 | * Devices are disabled till a gadget driver successfully bind()s, which |
| 1039 | * means the driver will handle setup() requests needed to enumerate (and | 1041 | * means the driver will handle setup() requests needed to enumerate (and |
| @@ -1097,6 +1099,7 @@ struct usb_gadget_driver { | |||
| 1097 | 1099 | ||
| 1098 | char *udc_name; | 1100 | char *udc_name; |
| 1099 | struct list_head pending; | 1101 | struct list_head pending; |
| 1102 | unsigned match_existing_only:1; | ||
| 1100 | }; | 1103 | }; |
| 1101 | 1104 | ||
| 1102 | 1105 | ||
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 0b3da40a525e..d315c8907869 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
| @@ -142,10 +142,11 @@ enum musb_vbus_id_status { | |||
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) | 144 | #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) |
| 145 | void musb_mailbox(enum musb_vbus_id_status status); | 145 | int musb_mailbox(enum musb_vbus_id_status status); |
| 146 | #else | 146 | #else |
| 147 | static inline void musb_mailbox(enum musb_vbus_id_status status) | 147 | static inline int musb_mailbox(enum musb_vbus_id_status status) |
| 148 | { | 148 | { |
| 149 | return 0; | ||
| 149 | } | 150 | } |
| 150 | #endif | 151 | #endif |
| 151 | 152 | ||
