diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/compiler.h | 7 | ||||
-rw-r--r-- | include/linux/cpuhotplug.h | 2 | ||||
-rw-r--r-- | include/linux/fscrypto.h | 5 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 6 | ||||
-rw-r--r-- | include/linux/irq.h | 10 | ||||
-rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 5 | ||||
-rw-r--r-- | include/linux/netdevice.h | 1 | ||||
-rw-r--r-- | include/linux/thread_info.h | 7 | ||||
-rw-r--r-- | include/linux/uio.h | 2 |
9 files changed, 30 insertions, 15 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 436aa4e42221..668569844d37 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -527,13 +527,14 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
527 | * object's lifetime is managed by something other than RCU. That | 527 | * object's lifetime is managed by something other than RCU. That |
528 | * "something other" might be reference counting or simple immortality. | 528 | * "something other" might be reference counting or simple immortality. |
529 | * | 529 | * |
530 | * The seemingly unused size_t variable is to validate @p is indeed a pointer | 530 | * The seemingly unused variable ___typecheck_p validates that @p is |
531 | * type by making sure it can be dereferenced. | 531 | * indeed a pointer type by using a pointer to typeof(*p) as the type. |
532 | * Taking a pointer to typeof(*p) again is needed in case p is void *. | ||
532 | */ | 533 | */ |
533 | #define lockless_dereference(p) \ | 534 | #define lockless_dereference(p) \ |
534 | ({ \ | 535 | ({ \ |
535 | typeof(p) _________p1 = READ_ONCE(p); \ | 536 | typeof(p) _________p1 = READ_ONCE(p); \ |
536 | size_t __maybe_unused __size_of_ptr = sizeof(*(p)); \ | 537 | typeof(*(p)) *___typecheck_p __maybe_unused; \ |
537 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | 538 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ |
538 | (_________p1); \ | 539 | (_________p1); \ |
539 | }) | 540 | }) |
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 242bf530edfc..34bd80512a0c 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __CPUHOTPLUG_H | 1 | #ifndef __CPUHOTPLUG_H |
2 | #define __CPUHOTPLUG_H | 2 | #define __CPUHOTPLUG_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | enum cpuhp_state { | 6 | enum cpuhp_state { |
5 | CPUHP_OFFLINE, | 7 | CPUHP_OFFLINE, |
6 | CPUHP_CREATE_THREADS, | 8 | CPUHP_CREATE_THREADS, |
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h index cfa6cde25f8e..76cff18bb032 100644 --- a/include/linux/fscrypto.h +++ b/include/linux/fscrypto.h | |||
@@ -274,8 +274,7 @@ extern void fscrypt_restore_control_page(struct page *); | |||
274 | extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t, | 274 | extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t, |
275 | unsigned int); | 275 | unsigned int); |
276 | /* policy.c */ | 276 | /* policy.c */ |
277 | extern int fscrypt_process_policy(struct inode *, | 277 | extern int fscrypt_process_policy(struct file *, const struct fscrypt_policy *); |
278 | const struct fscrypt_policy *); | ||
279 | extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *); | 278 | extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *); |
280 | extern int fscrypt_has_permitted_context(struct inode *, struct inode *); | 279 | extern int fscrypt_has_permitted_context(struct inode *, struct inode *); |
281 | extern int fscrypt_inherit_context(struct inode *, struct inode *, | 280 | extern int fscrypt_inherit_context(struct inode *, struct inode *, |
@@ -345,7 +344,7 @@ static inline int fscrypt_notsupp_zeroout_range(struct inode *i, pgoff_t p, | |||
345 | } | 344 | } |
346 | 345 | ||
347 | /* policy.c */ | 346 | /* policy.c */ |
348 | static inline int fscrypt_notsupp_process_policy(struct inode *i, | 347 | static inline int fscrypt_notsupp_process_policy(struct file *f, |
349 | const struct fscrypt_policy *p) | 348 | const struct fscrypt_policy *p) |
350 | { | 349 | { |
351 | return -EOPNOTSUPP; | 350 | return -EOPNOTSUPP; |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 58205f33af02..7268ed076be8 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -148,6 +148,7 @@ struct fsnotify_group { | |||
148 | #define FS_PRIO_1 1 /* fanotify content based access control */ | 148 | #define FS_PRIO_1 1 /* fanotify content based access control */ |
149 | #define FS_PRIO_2 2 /* fanotify pre-content access */ | 149 | #define FS_PRIO_2 2 /* fanotify pre-content access */ |
150 | unsigned int priority; | 150 | unsigned int priority; |
151 | bool shutdown; /* group is being shut down, don't queue more events */ | ||
151 | 152 | ||
152 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ | 153 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ |
153 | struct mutex mark_mutex; /* protect marks_list */ | 154 | struct mutex mark_mutex; /* protect marks_list */ |
@@ -179,7 +180,6 @@ struct fsnotify_group { | |||
179 | spinlock_t access_lock; | 180 | spinlock_t access_lock; |
180 | struct list_head access_list; | 181 | struct list_head access_list; |
181 | wait_queue_head_t access_waitq; | 182 | wait_queue_head_t access_waitq; |
182 | atomic_t bypass_perm; | ||
183 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 183 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
184 | int f_flags; | 184 | int f_flags; |
185 | unsigned int max_marks; | 185 | unsigned int max_marks; |
@@ -292,6 +292,8 @@ extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *op | |||
292 | extern void fsnotify_get_group(struct fsnotify_group *group); | 292 | extern void fsnotify_get_group(struct fsnotify_group *group); |
293 | /* drop reference on a group from fsnotify_alloc_group */ | 293 | /* drop reference on a group from fsnotify_alloc_group */ |
294 | extern void fsnotify_put_group(struct fsnotify_group *group); | 294 | extern void fsnotify_put_group(struct fsnotify_group *group); |
295 | /* group destruction begins, stop queuing new events */ | ||
296 | extern void fsnotify_group_stop_queueing(struct fsnotify_group *group); | ||
295 | /* destroy group */ | 297 | /* destroy group */ |
296 | extern void fsnotify_destroy_group(struct fsnotify_group *group); | 298 | extern void fsnotify_destroy_group(struct fsnotify_group *group); |
297 | /* fasync handler function */ | 299 | /* fasync handler function */ |
@@ -304,8 +306,6 @@ extern int fsnotify_add_event(struct fsnotify_group *group, | |||
304 | struct fsnotify_event *event, | 306 | struct fsnotify_event *event, |
305 | int (*merge)(struct list_head *, | 307 | int (*merge)(struct list_head *, |
306 | struct fsnotify_event *)); | 308 | struct fsnotify_event *)); |
307 | /* Remove passed event from groups notification queue */ | ||
308 | extern void fsnotify_remove_event(struct fsnotify_group *group, struct fsnotify_event *event); | ||
309 | /* true if the group notification queue is empty */ | 309 | /* true if the group notification queue is empty */ |
310 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); | 310 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); |
311 | /* return, but do not dequeue the first event on the notification queue */ | 311 | /* return, but do not dequeue the first event on the notification queue */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index b52424eaa0ed..0ac26c892fe2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -945,6 +945,16 @@ static inline void irq_gc_lock(struct irq_chip_generic *gc) { } | |||
945 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } | 945 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } |
946 | #endif | 946 | #endif |
947 | 947 | ||
948 | /* | ||
949 | * The irqsave variants are for usage in non interrupt code. Do not use | ||
950 | * them in irq_chip callbacks. Use irq_gc_lock() instead. | ||
951 | */ | ||
952 | #define irq_gc_lock_irqsave(gc, flags) \ | ||
953 | raw_spin_lock_irqsave(&(gc)->lock, flags) | ||
954 | |||
955 | #define irq_gc_unlock_irqrestore(gc, flags) \ | ||
956 | raw_spin_unlock_irqrestore(&(gc)->lock, flags) | ||
957 | |||
948 | static inline void irq_reg_writel(struct irq_chip_generic *gc, | 958 | static inline void irq_reg_writel(struct irq_chip_generic *gc, |
949 | u32 val, int reg_offset) | 959 | u32 val, int reg_offset) |
950 | { | 960 | { |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 21bc4557b67a..d1f9a581aca8 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
@@ -6710,9 +6710,10 @@ struct mlx5_ifc_pude_reg_bits { | |||
6710 | }; | 6710 | }; |
6711 | 6711 | ||
6712 | struct mlx5_ifc_ptys_reg_bits { | 6712 | struct mlx5_ifc_ptys_reg_bits { |
6713 | u8 an_disable_cap[0x1]; | 6713 | u8 reserved_at_0[0x1]; |
6714 | u8 an_disable_admin[0x1]; | 6714 | u8 an_disable_admin[0x1]; |
6715 | u8 reserved_at_2[0x6]; | 6715 | u8 an_disable_cap[0x1]; |
6716 | u8 reserved_at_3[0x5]; | ||
6716 | u8 local_port[0x8]; | 6717 | u8 local_port[0x8]; |
6717 | u8 reserved_at_10[0xd]; | 6718 | u8 reserved_at_10[0xd]; |
6718 | u8 proto_mask[0x3]; | 6719 | u8 proto_mask[0x3]; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3a788bf0affd..e8d79d4ebcfe 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3267,6 +3267,7 @@ static inline void napi_free_frags(struct napi_struct *napi) | |||
3267 | napi->skb = NULL; | 3267 | napi->skb = NULL; |
3268 | } | 3268 | } |
3269 | 3269 | ||
3270 | bool netdev_is_rx_handler_busy(struct net_device *dev); | ||
3270 | int netdev_rx_handler_register(struct net_device *dev, | 3271 | int netdev_rx_handler_register(struct net_device *dev, |
3271 | rx_handler_func_t *rx_handler, | 3272 | rx_handler_func_t *rx_handler, |
3272 | void *rx_handler_data); | 3273 | void *rx_handler_data); |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index cbd8990e2e77..2b5b10eed74f 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -118,10 +118,11 @@ static inline int arch_within_stack_frames(const void * const stack, | |||
118 | extern void __check_object_size(const void *ptr, unsigned long n, | 118 | extern void __check_object_size(const void *ptr, unsigned long n, |
119 | bool to_user); | 119 | bool to_user); |
120 | 120 | ||
121 | static inline void check_object_size(const void *ptr, unsigned long n, | 121 | static __always_inline void check_object_size(const void *ptr, unsigned long n, |
122 | bool to_user) | 122 | bool to_user) |
123 | { | 123 | { |
124 | __check_object_size(ptr, n, to_user); | 124 | if (!__builtin_constant_p(n)) |
125 | __check_object_size(ptr, n, to_user); | ||
125 | } | 126 | } |
126 | #else | 127 | #else |
127 | static inline void check_object_size(const void *ptr, unsigned long n, | 128 | static inline void check_object_size(const void *ptr, unsigned long n, |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 1b5d1cd796e2..75b4aaf31a9d 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -76,7 +76,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, | |||
76 | struct iov_iter *i, unsigned long offset, size_t bytes); | 76 | struct iov_iter *i, unsigned long offset, size_t bytes); |
77 | void iov_iter_advance(struct iov_iter *i, size_t bytes); | 77 | void iov_iter_advance(struct iov_iter *i, size_t bytes); |
78 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); | 78 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); |
79 | int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes); | 79 | #define iov_iter_fault_in_multipages_readable iov_iter_fault_in_readable |
80 | size_t iov_iter_single_seg_count(const struct iov_iter *i); | 80 | size_t iov_iter_single_seg_count(const struct iov_iter *i); |
81 | size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, | 81 | size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, |
82 | struct iov_iter *i); | 82 | struct iov_iter *i); |