diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /include | |
parent | aa877175e7a9982233ed8f10cb4bfddd78d82741 (diff) | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'include')
32 files changed, 245 insertions, 144 deletions
diff --git a/include/asm-generic/qrwlock.h b/include/asm-generic/qrwlock.h index 54a8e65e18b6..7d026bf27713 100644 --- a/include/asm-generic/qrwlock.h +++ b/include/asm-generic/qrwlock.h | |||
@@ -25,7 +25,20 @@ | |||
25 | #include <asm-generic/qrwlock_types.h> | 25 | #include <asm-generic/qrwlock_types.h> |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Writer states & reader shift and bias | 28 | * Writer states & reader shift and bias. |
29 | * | ||
30 | * | +0 | +1 | +2 | +3 | | ||
31 | * ----+----+----+----+----+ | ||
32 | * LE | 78 | 56 | 34 | 12 | 0x12345678 | ||
33 | * ----+----+----+----+----+ | ||
34 | * | wr | rd | | ||
35 | * +----+----+----+----+ | ||
36 | * | ||
37 | * ----+----+----+----+----+ | ||
38 | * BE | 12 | 34 | 56 | 78 | 0x12345678 | ||
39 | * ----+----+----+----+----+ | ||
40 | * | rd | wr | | ||
41 | * +----+----+----+----+ | ||
29 | */ | 42 | */ |
30 | #define _QW_WAITING 1 /* A writer is waiting */ | 43 | #define _QW_WAITING 1 /* A writer is waiting */ |
31 | #define _QW_LOCKED 0xff /* A writer holds the lock */ | 44 | #define _QW_LOCKED 0xff /* A writer holds the lock */ |
@@ -134,12 +147,22 @@ static inline void queued_read_unlock(struct qrwlock *lock) | |||
134 | } | 147 | } |
135 | 148 | ||
136 | /** | 149 | /** |
150 | * __qrwlock_write_byte - retrieve the write byte address of a queue rwlock | ||
151 | * @lock : Pointer to queue rwlock structure | ||
152 | * Return: the write byte address of a queue rwlock | ||
153 | */ | ||
154 | static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) | ||
155 | { | ||
156 | return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); | ||
157 | } | ||
158 | |||
159 | /** | ||
137 | * queued_write_unlock - release write lock of a queue rwlock | 160 | * queued_write_unlock - release write lock of a queue rwlock |
138 | * @lock : Pointer to queue rwlock structure | 161 | * @lock : Pointer to queue rwlock structure |
139 | */ | 162 | */ |
140 | static inline void queued_write_unlock(struct qrwlock *lock) | 163 | static inline void queued_write_unlock(struct qrwlock *lock) |
141 | { | 164 | { |
142 | smp_store_release((u8 *)&lock->cnts, 0); | 165 | smp_store_release(__qrwlock_write_byte(lock), 0); |
143 | } | 166 | } |
144 | 167 | ||
145 | /* | 168 | /* |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 59ffaa68b11b..23ddf4b46a9b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -71,7 +71,8 @@ static inline bool bio_has_data(struct bio *bio) | |||
71 | { | 71 | { |
72 | if (bio && | 72 | if (bio && |
73 | bio->bi_iter.bi_size && | 73 | bio->bi_iter.bi_size && |
74 | bio_op(bio) != REQ_OP_DISCARD) | 74 | bio_op(bio) != REQ_OP_DISCARD && |
75 | bio_op(bio) != REQ_OP_SECURE_ERASE) | ||
75 | return true; | 76 | return true; |
76 | 77 | ||
77 | return false; | 78 | return false; |
@@ -79,7 +80,9 @@ static inline bool bio_has_data(struct bio *bio) | |||
79 | 80 | ||
80 | static inline bool bio_no_advance_iter(struct bio *bio) | 81 | static inline bool bio_no_advance_iter(struct bio *bio) |
81 | { | 82 | { |
82 | return bio_op(bio) == REQ_OP_DISCARD || bio_op(bio) == REQ_OP_WRITE_SAME; | 83 | return bio_op(bio) == REQ_OP_DISCARD || |
84 | bio_op(bio) == REQ_OP_SECURE_ERASE || | ||
85 | bio_op(bio) == REQ_OP_WRITE_SAME; | ||
83 | } | 86 | } |
84 | 87 | ||
85 | static inline bool bio_is_rw(struct bio *bio) | 88 | static inline bool bio_is_rw(struct bio *bio) |
@@ -199,6 +202,9 @@ static inline unsigned bio_segments(struct bio *bio) | |||
199 | if (bio_op(bio) == REQ_OP_DISCARD) | 202 | if (bio_op(bio) == REQ_OP_DISCARD) |
200 | return 1; | 203 | return 1; |
201 | 204 | ||
205 | if (bio_op(bio) == REQ_OP_SECURE_ERASE) | ||
206 | return 1; | ||
207 | |||
202 | if (bio_op(bio) == REQ_OP_WRITE_SAME) | 208 | if (bio_op(bio) == REQ_OP_WRITE_SAME) |
203 | return 1; | 209 | return 1; |
204 | 210 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2c210b6a7bcf..e79055c8b577 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -882,7 +882,7 @@ static inline unsigned int blk_rq_cur_sectors(const struct request *rq) | |||
882 | static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q, | 882 | static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q, |
883 | int op) | 883 | int op) |
884 | { | 884 | { |
885 | if (unlikely(op == REQ_OP_DISCARD)) | 885 | if (unlikely(op == REQ_OP_DISCARD || op == REQ_OP_SECURE_ERASE)) |
886 | return min(q->limits.max_discard_sectors, UINT_MAX >> 9); | 886 | return min(q->limits.max_discard_sectors, UINT_MAX >> 9); |
887 | 887 | ||
888 | if (unlikely(op == REQ_OP_WRITE_SAME)) | 888 | if (unlikely(op == REQ_OP_WRITE_SAME)) |
@@ -913,7 +913,9 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq, | |||
913 | if (unlikely(rq->cmd_type != REQ_TYPE_FS)) | 913 | if (unlikely(rq->cmd_type != REQ_TYPE_FS)) |
914 | return q->limits.max_hw_sectors; | 914 | return q->limits.max_hw_sectors; |
915 | 915 | ||
916 | if (!q->limits.chunk_sectors || (req_op(rq) == REQ_OP_DISCARD)) | 916 | if (!q->limits.chunk_sectors || |
917 | req_op(rq) == REQ_OP_DISCARD || | ||
918 | req_op(rq) == REQ_OP_SECURE_ERASE) | ||
917 | return blk_queue_get_max_sectors(q, req_op(rq)); | 919 | return blk_queue_get_max_sectors(q, req_op(rq)); |
918 | 920 | ||
919 | return min(blk_max_size_offset(q, offset), | 921 | return min(blk_max_size_offset(q, offset), |
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 701b64a3b7c5..89b65b82d98f 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h | |||
@@ -74,7 +74,8 @@ static inline void bvec_iter_advance(const struct bio_vec *bv, | |||
74 | "Attempted to advance past end of bvec iter\n"); | 74 | "Attempted to advance past end of bvec iter\n"); |
75 | 75 | ||
76 | while (bytes) { | 76 | while (bytes) { |
77 | unsigned len = min(bytes, bvec_iter_len(bv, *iter)); | 77 | unsigned iter_len = bvec_iter_len(bv, *iter); |
78 | unsigned len = min(bytes, iter_len); | ||
78 | 79 | ||
79 | bytes -= len; | 80 | bytes -= len; |
80 | iter->bi_size -= len; | 81 | iter->bi_size -= len; |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index e2949397c19b..8dbc8929a6a0 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -242,7 +242,11 @@ | |||
242 | */ | 242 | */ |
243 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | 243 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
244 | 244 | ||
245 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 245 | /* |
246 | * sparse (__CHECKER__) pretends to be gcc, but can't do constant | ||
247 | * folding in __builtin_bswap*() (yet), so don't set these for it. | ||
248 | */ | ||
249 | #if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__) | ||
246 | #if GCC_VERSION >= 40400 | 250 | #if GCC_VERSION >= 40400 |
247 | #define __HAVE_BUILTIN_BSWAP32__ | 251 | #define __HAVE_BUILTIN_BSWAP32__ |
248 | #define __HAVE_BUILTIN_BSWAP64__ | 252 | #define __HAVE_BUILTIN_BSWAP64__ |
@@ -250,7 +254,7 @@ | |||
250 | #if GCC_VERSION >= 40800 | 254 | #if GCC_VERSION >= 40800 |
251 | #define __HAVE_BUILTIN_BSWAP16__ | 255 | #define __HAVE_BUILTIN_BSWAP16__ |
252 | #endif | 256 | #endif |
253 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | 257 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */ |
254 | 258 | ||
255 | #if GCC_VERSION >= 50000 | 259 | #if GCC_VERSION >= 50000 |
256 | #define KASAN_ABI_VERSION 4 | 260 | #define KASAN_ABI_VERSION 4 |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 1bb954842725..436aa4e42221 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -527,13 +527,13 @@ 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 void * variable is to validate @p is indeed a pointer | 530 | * The seemingly unused size_t variable is to validate @p is indeed a pointer |
531 | * type. All pointer types silently cast to void *. | 531 | * type by making sure it can be dereferenced. |
532 | */ | 532 | */ |
533 | #define lockless_dereference(p) \ | 533 | #define lockless_dereference(p) \ |
534 | ({ \ | 534 | ({ \ |
535 | typeof(p) _________p1 = READ_ONCE(p); \ | 535 | typeof(p) _________p1 = READ_ONCE(p); \ |
536 | __maybe_unused const void * const _________p2 = _________p1; \ | 536 | size_t __maybe_unused __size_of_ptr = sizeof(*(p)); \ |
537 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | 537 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ |
538 | (_________p1); \ | 538 | (_________p1); \ |
539 | }) | 539 | }) |
diff --git a/include/linux/host1x.h b/include/linux/host1x.h index d2ba7d334039..1ffbf2a8cb99 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h | |||
@@ -304,6 +304,8 @@ struct tegra_mipi_device; | |||
304 | 304 | ||
305 | struct tegra_mipi_device *tegra_mipi_request(struct device *device); | 305 | struct tegra_mipi_device *tegra_mipi_request(struct device *device); |
306 | void tegra_mipi_free(struct tegra_mipi_device *device); | 306 | void tegra_mipi_free(struct tegra_mipi_device *device); |
307 | int tegra_mipi_enable(struct tegra_mipi_device *device); | ||
308 | int tegra_mipi_disable(struct tegra_mipi_device *device); | ||
307 | int tegra_mipi_calibrate(struct tegra_mipi_device *device); | 309 | int tegra_mipi_calibrate(struct tegra_mipi_device *device); |
308 | 310 | ||
309 | #endif | 311 | #endif |
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 56b0b7ec66aa..99ac022edc60 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
@@ -337,6 +337,7 @@ | |||
337 | */ | 337 | */ |
338 | #define E_ITS_MOVI_UNMAPPED_INTERRUPT 0x010107 | 338 | #define E_ITS_MOVI_UNMAPPED_INTERRUPT 0x010107 |
339 | #define E_ITS_MOVI_UNMAPPED_COLLECTION 0x010109 | 339 | #define E_ITS_MOVI_UNMAPPED_COLLECTION 0x010109 |
340 | #define E_ITS_INT_UNMAPPED_INTERRUPT 0x010307 | ||
340 | #define E_ITS_CLEAR_UNMAPPED_INTERRUPT 0x010507 | 341 | #define E_ITS_CLEAR_UNMAPPED_INTERRUPT 0x010507 |
341 | #define E_ITS_MAPD_DEVICE_OOR 0x010801 | 342 | #define E_ITS_MAPD_DEVICE_OOR 0x010801 |
342 | #define E_ITS_MAPC_PROCNUM_OOR 0x010902 | 343 | #define E_ITS_MAPC_PROCNUM_OOR 0x010902 |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 01e908ac4a39..9c28b4d4c90b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -1113,9 +1113,21 @@ struct kvm_device { | |||
1113 | /* create, destroy, and name are mandatory */ | 1113 | /* create, destroy, and name are mandatory */ |
1114 | struct kvm_device_ops { | 1114 | struct kvm_device_ops { |
1115 | const char *name; | 1115 | const char *name; |
1116 | |||
1117 | /* | ||
1118 | * create is called holding kvm->lock and any operations not suitable | ||
1119 | * to do while holding the lock should be deferred to init (see | ||
1120 | * below). | ||
1121 | */ | ||
1116 | int (*create)(struct kvm_device *dev, u32 type); | 1122 | int (*create)(struct kvm_device *dev, u32 type); |
1117 | 1123 | ||
1118 | /* | 1124 | /* |
1125 | * init is called after create if create is successful and is called | ||
1126 | * outside of holding kvm->lock. | ||
1127 | */ | ||
1128 | void (*init)(struct kvm_device *dev); | ||
1129 | |||
1130 | /* | ||
1119 | * Destroy is responsible for freeing dev. | 1131 | * Destroy is responsible for freeing dev. |
1120 | * | 1132 | * |
1121 | * Destroy may be called before or after destructors are called | 1133 | * Destroy may be called before or after destructors are called |
diff --git a/include/linux/msi.h b/include/linux/msi.h index 4f0bfe5912b2..e8c81fbd5f9c 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -270,6 +270,8 @@ enum { | |||
270 | MSI_FLAG_MULTI_PCI_MSI = (1 << 2), | 270 | MSI_FLAG_MULTI_PCI_MSI = (1 << 2), |
271 | /* Support PCI MSIX interrupts */ | 271 | /* Support PCI MSIX interrupts */ |
272 | MSI_FLAG_PCI_MSIX = (1 << 3), | 272 | MSI_FLAG_PCI_MSIX = (1 << 3), |
273 | /* Needs early activate, required for PCI */ | ||
274 | MSI_FLAG_ACTIVATE_EARLY = (1 << 4), | ||
273 | }; | 275 | }; |
274 | 276 | ||
275 | int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask, | 277 | int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 076df5360ba5..3a788bf0affd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3891,8 +3891,7 @@ void netdev_default_l2upper_neigh_destroy(struct net_device *dev, | |||
3891 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; | 3891 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; |
3892 | void netdev_rss_key_fill(void *buffer, size_t len); | 3892 | void netdev_rss_key_fill(void *buffer, size_t len); |
3893 | 3893 | ||
3894 | int dev_get_nest_level(struct net_device *dev, | 3894 | int dev_get_nest_level(struct net_device *dev); |
3895 | bool (*type_check)(const struct net_device *dev)); | ||
3896 | int skb_checksum_help(struct sk_buff *skb); | 3895 | int skb_checksum_help(struct sk_buff *skb); |
3897 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | 3896 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
3898 | netdev_features_t features, bool tx_path); | 3897 | netdev_features_t features, bool tx_path); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2599a980340f..fbc1fa625c3e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1251,10 +1251,12 @@ resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev, int resno); | |||
1251 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, | 1251 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, |
1252 | unsigned int command_bits, u32 flags); | 1252 | unsigned int command_bits, u32 flags); |
1253 | 1253 | ||
1254 | #define PCI_IRQ_NOLEGACY (1 << 0) /* don't use legacy interrupts */ | 1254 | #define PCI_IRQ_LEGACY (1 << 0) /* allow legacy interrupts */ |
1255 | #define PCI_IRQ_NOMSI (1 << 1) /* don't use MSI interrupts */ | 1255 | #define PCI_IRQ_MSI (1 << 1) /* allow MSI interrupts */ |
1256 | #define PCI_IRQ_NOMSIX (1 << 2) /* don't use MSI-X interrupts */ | 1256 | #define PCI_IRQ_MSIX (1 << 2) /* allow MSI-X interrupts */ |
1257 | #define PCI_IRQ_NOAFFINITY (1 << 3) /* don't auto-assign affinity */ | 1257 | #define PCI_IRQ_AFFINITY (1 << 3) /* auto-assign affinity */ |
1258 | #define PCI_IRQ_ALL_TYPES \ | ||
1259 | (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX) | ||
1258 | 1260 | ||
1259 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 1261 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
1260 | 1262 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 8ed4326164cc..2b6b43cc0dd5 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -743,7 +743,9 @@ struct perf_event_context { | |||
743 | u64 parent_gen; | 743 | u64 parent_gen; |
744 | u64 generation; | 744 | u64 generation; |
745 | int pin_count; | 745 | int pin_count; |
746 | #ifdef CONFIG_CGROUP_PERF | ||
746 | int nr_cgroups; /* cgroup evts */ | 747 | int nr_cgroups; /* cgroup evts */ |
748 | #endif | ||
747 | void *task_ctx_data; /* pmu specific data */ | 749 | void *task_ctx_data; /* pmu specific data */ |
748 | struct rcu_head rcu_head; | 750 | struct rcu_head rcu_head; |
749 | }; | 751 | }; |
@@ -769,7 +771,9 @@ struct perf_cpu_context { | |||
769 | unsigned int hrtimer_active; | 771 | unsigned int hrtimer_active; |
770 | 772 | ||
771 | struct pmu *unique_pmu; | 773 | struct pmu *unique_pmu; |
774 | #ifdef CONFIG_CGROUP_PERF | ||
772 | struct perf_cgroup *cgrp; | 775 | struct perf_cgroup *cgrp; |
776 | #endif | ||
773 | }; | 777 | }; |
774 | 778 | ||
775 | struct perf_output_handle { | 779 | struct perf_output_handle { |
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h index b1e3c57c7117..d6c4177df7cb 100644 --- a/include/linux/qed/qed_if.h +++ b/include/linux/qed/qed_if.h | |||
@@ -70,8 +70,16 @@ struct qed_dbcx_pfc_params { | |||
70 | u8 max_tc; | 70 | u8 max_tc; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | enum qed_dcbx_sf_ieee_type { | ||
74 | QED_DCBX_SF_IEEE_ETHTYPE, | ||
75 | QED_DCBX_SF_IEEE_TCP_PORT, | ||
76 | QED_DCBX_SF_IEEE_UDP_PORT, | ||
77 | QED_DCBX_SF_IEEE_TCP_UDP_PORT | ||
78 | }; | ||
79 | |||
73 | struct qed_app_entry { | 80 | struct qed_app_entry { |
74 | bool ethtype; | 81 | bool ethtype; |
82 | enum qed_dcbx_sf_ieee_type sf_ieee; | ||
75 | bool enabled; | 83 | bool enabled; |
76 | u8 prio; | 84 | u8 prio; |
77 | u16 proto_id; | 85 | u16 proto_id; |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index de1f64318fc4..fcb4c3646173 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -705,70 +705,6 @@ typedef struct sctp_auth_chunk { | |||
705 | sctp_authhdr_t auth_hdr; | 705 | sctp_authhdr_t auth_hdr; |
706 | } __packed sctp_auth_chunk_t; | 706 | } __packed sctp_auth_chunk_t; |
707 | 707 | ||
708 | struct sctp_info { | ||
709 | __u32 sctpi_tag; | ||
710 | __u32 sctpi_state; | ||
711 | __u32 sctpi_rwnd; | ||
712 | __u16 sctpi_unackdata; | ||
713 | __u16 sctpi_penddata; | ||
714 | __u16 sctpi_instrms; | ||
715 | __u16 sctpi_outstrms; | ||
716 | __u32 sctpi_fragmentation_point; | ||
717 | __u32 sctpi_inqueue; | ||
718 | __u32 sctpi_outqueue; | ||
719 | __u32 sctpi_overall_error; | ||
720 | __u32 sctpi_max_burst; | ||
721 | __u32 sctpi_maxseg; | ||
722 | __u32 sctpi_peer_rwnd; | ||
723 | __u32 sctpi_peer_tag; | ||
724 | __u8 sctpi_peer_capable; | ||
725 | __u8 sctpi_peer_sack; | ||
726 | __u16 __reserved1; | ||
727 | |||
728 | /* assoc status info */ | ||
729 | __u64 sctpi_isacks; | ||
730 | __u64 sctpi_osacks; | ||
731 | __u64 sctpi_opackets; | ||
732 | __u64 sctpi_ipackets; | ||
733 | __u64 sctpi_rtxchunks; | ||
734 | __u64 sctpi_outofseqtsns; | ||
735 | __u64 sctpi_idupchunks; | ||
736 | __u64 sctpi_gapcnt; | ||
737 | __u64 sctpi_ouodchunks; | ||
738 | __u64 sctpi_iuodchunks; | ||
739 | __u64 sctpi_oodchunks; | ||
740 | __u64 sctpi_iodchunks; | ||
741 | __u64 sctpi_octrlchunks; | ||
742 | __u64 sctpi_ictrlchunks; | ||
743 | |||
744 | /* primary transport info */ | ||
745 | struct sockaddr_storage sctpi_p_address; | ||
746 | __s32 sctpi_p_state; | ||
747 | __u32 sctpi_p_cwnd; | ||
748 | __u32 sctpi_p_srtt; | ||
749 | __u32 sctpi_p_rto; | ||
750 | __u32 sctpi_p_hbinterval; | ||
751 | __u32 sctpi_p_pathmaxrxt; | ||
752 | __u32 sctpi_p_sackdelay; | ||
753 | __u32 sctpi_p_sackfreq; | ||
754 | __u32 sctpi_p_ssthresh; | ||
755 | __u32 sctpi_p_partial_bytes_acked; | ||
756 | __u32 sctpi_p_flight_size; | ||
757 | __u16 sctpi_p_error; | ||
758 | __u16 __reserved2; | ||
759 | |||
760 | /* sctp sock info */ | ||
761 | __u32 sctpi_s_autoclose; | ||
762 | __u32 sctpi_s_adaptation_ind; | ||
763 | __u32 sctpi_s_pd_point; | ||
764 | __u8 sctpi_s_nodelay; | ||
765 | __u8 sctpi_s_disable_fragments; | ||
766 | __u8 sctpi_s_v4mapped; | ||
767 | __u8 sctpi_s_frag_interleave; | ||
768 | __u32 sctpi_s_type; | ||
769 | __u32 __reserved3; | ||
770 | }; | ||
771 | |||
772 | struct sctp_infox { | 708 | struct sctp_infox { |
773 | struct sctp_info *sctpinfo; | 709 | struct sctp_info *sctpinfo; |
774 | struct sctp_association *asoc; | 710 | struct sctp_association *asoc; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6f0b3e0adc73..0f665cb26b50 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -2847,6 +2847,18 @@ static inline int skb_linearize_cow(struct sk_buff *skb) | |||
2847 | __skb_linearize(skb) : 0; | 2847 | __skb_linearize(skb) : 0; |
2848 | } | 2848 | } |
2849 | 2849 | ||
2850 | static __always_inline void | ||
2851 | __skb_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len, | ||
2852 | unsigned int off) | ||
2853 | { | ||
2854 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
2855 | skb->csum = csum_block_sub(skb->csum, | ||
2856 | csum_partial(start, len, 0), off); | ||
2857 | else if (skb->ip_summed == CHECKSUM_PARTIAL && | ||
2858 | skb_checksum_start_offset(skb) < 0) | ||
2859 | skb->ip_summed = CHECKSUM_NONE; | ||
2860 | } | ||
2861 | |||
2850 | /** | 2862 | /** |
2851 | * skb_postpull_rcsum - update checksum for received skb after pull | 2863 | * skb_postpull_rcsum - update checksum for received skb after pull |
2852 | * @skb: buffer to update | 2864 | * @skb: buffer to update |
@@ -2857,36 +2869,38 @@ static inline int skb_linearize_cow(struct sk_buff *skb) | |||
2857 | * update the CHECKSUM_COMPLETE checksum, or set ip_summed to | 2869 | * update the CHECKSUM_COMPLETE checksum, or set ip_summed to |
2858 | * CHECKSUM_NONE so that it can be recomputed from scratch. | 2870 | * CHECKSUM_NONE so that it can be recomputed from scratch. |
2859 | */ | 2871 | */ |
2860 | |||
2861 | static inline void skb_postpull_rcsum(struct sk_buff *skb, | 2872 | static inline void skb_postpull_rcsum(struct sk_buff *skb, |
2862 | const void *start, unsigned int len) | 2873 | const void *start, unsigned int len) |
2863 | { | 2874 | { |
2864 | if (skb->ip_summed == CHECKSUM_COMPLETE) | 2875 | __skb_postpull_rcsum(skb, start, len, 0); |
2865 | skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); | ||
2866 | else if (skb->ip_summed == CHECKSUM_PARTIAL && | ||
2867 | skb_checksum_start_offset(skb) < 0) | ||
2868 | skb->ip_summed = CHECKSUM_NONE; | ||
2869 | } | 2876 | } |
2870 | 2877 | ||
2871 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); | 2878 | static __always_inline void |
2879 | __skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len, | ||
2880 | unsigned int off) | ||
2881 | { | ||
2882 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
2883 | skb->csum = csum_block_add(skb->csum, | ||
2884 | csum_partial(start, len, 0), off); | ||
2885 | } | ||
2872 | 2886 | ||
2887 | /** | ||
2888 | * skb_postpush_rcsum - update checksum for received skb after push | ||
2889 | * @skb: buffer to update | ||
2890 | * @start: start of data after push | ||
2891 | * @len: length of data pushed | ||
2892 | * | ||
2893 | * After doing a push on a received packet, you need to call this to | ||
2894 | * update the CHECKSUM_COMPLETE checksum. | ||
2895 | */ | ||
2873 | static inline void skb_postpush_rcsum(struct sk_buff *skb, | 2896 | static inline void skb_postpush_rcsum(struct sk_buff *skb, |
2874 | const void *start, unsigned int len) | 2897 | const void *start, unsigned int len) |
2875 | { | 2898 | { |
2876 | /* For performing the reverse operation to skb_postpull_rcsum(), | 2899 | __skb_postpush_rcsum(skb, start, len, 0); |
2877 | * we can instead of ... | ||
2878 | * | ||
2879 | * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); | ||
2880 | * | ||
2881 | * ... just use this equivalent version here to save a few | ||
2882 | * instructions. Feeding csum of 0 in csum_partial() and later | ||
2883 | * on adding skb->csum is equivalent to feed skb->csum in the | ||
2884 | * first place. | ||
2885 | */ | ||
2886 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
2887 | skb->csum = csum_partial(start, len, skb->csum); | ||
2888 | } | 2900 | } |
2889 | 2901 | ||
2902 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); | ||
2903 | |||
2890 | /** | 2904 | /** |
2891 | * skb_push_rcsum - push skb and update receive checksum | 2905 | * skb_push_rcsum - push skb and update receive checksum |
2892 | * @skb: buffer to update | 2906 | * @skb: buffer to update |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index b6810c92b8bb..5c02b0691587 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -195,6 +195,8 @@ int rpc_clnt_add_xprt(struct rpc_clnt *, struct xprt_create *, | |||
195 | struct rpc_xprt *, | 195 | struct rpc_xprt *, |
196 | void *), | 196 | void *), |
197 | void *data); | 197 | void *data); |
198 | void rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt, | ||
199 | unsigned long timeo); | ||
198 | 200 | ||
199 | const char *rpc_proc_name(const struct rpc_task *task); | 201 | const char *rpc_proc_name(const struct rpc_task *task); |
200 | #endif /* __KERNEL__ */ | 202 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 5e3e1b63dbb3..a16070dd03ee 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -218,7 +218,8 @@ struct rpc_xprt { | |||
218 | struct work_struct task_cleanup; | 218 | struct work_struct task_cleanup; |
219 | struct timer_list timer; | 219 | struct timer_list timer; |
220 | unsigned long last_used, | 220 | unsigned long last_used, |
221 | idle_timeout; | 221 | idle_timeout, |
222 | max_reconnect_timeout; | ||
222 | 223 | ||
223 | /* | 224 | /* |
224 | * Send stuff | 225 | * Send stuff |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 697e160c78d0..a4f7203a9017 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -42,6 +42,8 @@ extern int proc_dostring(struct ctl_table *, int, | |||
42 | void __user *, size_t *, loff_t *); | 42 | void __user *, size_t *, loff_t *); |
43 | extern int proc_dointvec(struct ctl_table *, int, | 43 | extern int proc_dointvec(struct ctl_table *, int, |
44 | void __user *, size_t *, loff_t *); | 44 | void __user *, size_t *, loff_t *); |
45 | extern int proc_douintvec(struct ctl_table *, int, | ||
46 | void __user *, size_t *, loff_t *); | ||
45 | extern int proc_dointvec_minmax(struct ctl_table *, int, | 47 | extern int proc_dointvec_minmax(struct ctl_table *, int, |
46 | void __user *, size_t *, loff_t *); | 48 | void __user *, size_t *, loff_t *); |
47 | extern int proc_dointvec_jiffies(struct ctl_table *, int, | 49 | extern int proc_dointvec_jiffies(struct ctl_table *, int, |
diff --git a/include/net/act_api.h b/include/net/act_api.h index 41e6a24a44b9..82f3c912a5b1 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -176,8 +176,8 @@ int tcf_register_action(struct tc_action_ops *a, struct pernet_operations *ops); | |||
176 | int tcf_unregister_action(struct tc_action_ops *a, | 176 | int tcf_unregister_action(struct tc_action_ops *a, |
177 | struct pernet_operations *ops); | 177 | struct pernet_operations *ops); |
178 | int tcf_action_destroy(struct list_head *actions, int bind); | 178 | int tcf_action_destroy(struct list_head *actions, int bind); |
179 | int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions, | 179 | int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions, |
180 | struct tcf_result *res); | 180 | int nr_actions, struct tcf_result *res); |
181 | int tcf_action_init(struct net *net, struct nlattr *nla, | 181 | int tcf_action_init(struct net *net, struct nlattr *nla, |
182 | struct nlattr *est, char *n, int ovr, | 182 | struct nlattr *est, char *n, int ovr, |
183 | int bind, struct list_head *); | 183 | int bind, struct list_head *); |
@@ -189,30 +189,17 @@ int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); | |||
189 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 189 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
190 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); | 190 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); |
191 | 191 | ||
192 | #define tc_no_actions(_exts) \ | 192 | #endif /* CONFIG_NET_CLS_ACT */ |
193 | (list_empty(&(_exts)->actions)) | ||
194 | |||
195 | #define tc_for_each_action(_a, _exts) \ | ||
196 | list_for_each_entry(a, &(_exts)->actions, list) | ||
197 | |||
198 | #define tc_single_action(_exts) \ | ||
199 | (list_is_singular(&(_exts)->actions)) | ||
200 | 193 | ||
201 | static inline void tcf_action_stats_update(struct tc_action *a, u64 bytes, | 194 | static inline void tcf_action_stats_update(struct tc_action *a, u64 bytes, |
202 | u64 packets, u64 lastuse) | 195 | u64 packets, u64 lastuse) |
203 | { | 196 | { |
197 | #ifdef CONFIG_NET_CLS_ACT | ||
204 | if (!a->ops->stats_update) | 198 | if (!a->ops->stats_update) |
205 | return; | 199 | return; |
206 | 200 | ||
207 | a->ops->stats_update(a, bytes, packets, lastuse); | 201 | a->ops->stats_update(a, bytes, packets, lastuse); |
202 | #endif | ||
208 | } | 203 | } |
209 | 204 | ||
210 | #else /* CONFIG_NET_CLS_ACT */ | ||
211 | |||
212 | #define tc_no_actions(_exts) true | ||
213 | #define tc_for_each_action(_a, _exts) while ((void)(_a), 0) | ||
214 | #define tc_single_action(_exts) false | ||
215 | #define tcf_action_stats_update(a, bytes, packets, lastuse) | ||
216 | |||
217 | #endif /* CONFIG_NET_CLS_ACT */ | ||
218 | #endif | 205 | #endif |
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h index ac1bc3c49fbd..7b0f88699b25 100644 --- a/include/net/af_rxrpc.h +++ b/include/net/af_rxrpc.h | |||
@@ -40,12 +40,12 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *, | |||
40 | unsigned long, | 40 | unsigned long, |
41 | gfp_t); | 41 | gfp_t); |
42 | int rxrpc_kernel_send_data(struct rxrpc_call *, struct msghdr *, size_t); | 42 | int rxrpc_kernel_send_data(struct rxrpc_call *, struct msghdr *, size_t); |
43 | void rxrpc_kernel_data_consumed(struct rxrpc_call *, struct sk_buff *); | ||
43 | void rxrpc_kernel_abort_call(struct rxrpc_call *, u32); | 44 | void rxrpc_kernel_abort_call(struct rxrpc_call *, u32); |
44 | void rxrpc_kernel_end_call(struct rxrpc_call *); | 45 | void rxrpc_kernel_end_call(struct rxrpc_call *); |
45 | bool rxrpc_kernel_is_data_last(struct sk_buff *); | 46 | bool rxrpc_kernel_is_data_last(struct sk_buff *); |
46 | u32 rxrpc_kernel_get_abort_code(struct sk_buff *); | 47 | u32 rxrpc_kernel_get_abort_code(struct sk_buff *); |
47 | int rxrpc_kernel_get_error_number(struct sk_buff *); | 48 | int rxrpc_kernel_get_error_number(struct sk_buff *); |
48 | void rxrpc_kernel_data_delivered(struct sk_buff *); | ||
49 | void rxrpc_kernel_free_skb(struct sk_buff *); | 49 | void rxrpc_kernel_free_skb(struct sk_buff *); |
50 | struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, unsigned long); | 50 | struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, unsigned long); |
51 | int rxrpc_kernel_reject_call(struct socket *); | 51 | int rxrpc_kernel_reject_call(struct socket *); |
diff --git a/include/net/gre.h b/include/net/gre.h index 7a54a31d1d4c..73ea256eb7d7 100644 --- a/include/net/gre.h +++ b/include/net/gre.h | |||
@@ -104,6 +104,7 @@ static inline void gre_build_header(struct sk_buff *skb, int hdr_len, | |||
104 | 104 | ||
105 | skb_push(skb, hdr_len); | 105 | skb_push(skb, hdr_len); |
106 | 106 | ||
107 | skb_set_inner_protocol(skb, proto); | ||
107 | skb_reset_transport_header(skb); | 108 | skb_reset_transport_header(skb); |
108 | greh = (struct gre_base_hdr *)skb->data; | 109 | greh = (struct gre_base_hdr *)skb->data; |
109 | greh->flags = gre_tnl_flags_to_gre_flags(flags); | 110 | greh->flags = gre_tnl_flags_to_gre_flags(flags); |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 0dc0a51da38f..dce2d586d9ce 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -128,7 +128,8 @@ static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) | |||
128 | to = from | htonl(INET_ECN_CE << 20); | 128 | to = from | htonl(INET_ECN_CE << 20); |
129 | *(__be32 *)iph = to; | 129 | *(__be32 *)iph = to; |
130 | if (skb->ip_summed == CHECKSUM_COMPLETE) | 130 | if (skb->ip_summed == CHECKSUM_COMPLETE) |
131 | skb->csum = csum_add(csum_sub(skb->csum, from), to); | 131 | skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), |
132 | (__force __wsum)to); | ||
132 | return 1; | 133 | return 1; |
133 | } | 134 | } |
134 | 135 | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b4faadbb4e01..cca510a585c3 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -3620,7 +3620,8 @@ struct ieee80211_ops { | |||
3620 | 3620 | ||
3621 | int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 3621 | int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
3622 | void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 3622 | void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
3623 | u32 (*get_expected_throughput)(struct ieee80211_sta *sta); | 3623 | u32 (*get_expected_throughput)(struct ieee80211_hw *hw, |
3624 | struct ieee80211_sta *sta); | ||
3624 | int (*get_txpower)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 3625 | int (*get_txpower)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
3625 | int *dbm); | 3626 | int *dbm); |
3626 | 3627 | ||
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 6f8d65342d3a..c99508d426cc 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -59,7 +59,8 @@ tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) | |||
59 | struct tcf_exts { | 59 | struct tcf_exts { |
60 | #ifdef CONFIG_NET_CLS_ACT | 60 | #ifdef CONFIG_NET_CLS_ACT |
61 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ | 61 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ |
62 | struct list_head actions; | 62 | int nr_actions; |
63 | struct tc_action **actions; | ||
63 | #endif | 64 | #endif |
64 | /* Map to export classifier specific extension TLV types to the | 65 | /* Map to export classifier specific extension TLV types to the |
65 | * generic extensions API. Unsupported extensions must be set to 0. | 66 | * generic extensions API. Unsupported extensions must be set to 0. |
@@ -72,7 +73,10 @@ static inline void tcf_exts_init(struct tcf_exts *exts, int action, int police) | |||
72 | { | 73 | { |
73 | #ifdef CONFIG_NET_CLS_ACT | 74 | #ifdef CONFIG_NET_CLS_ACT |
74 | exts->type = 0; | 75 | exts->type = 0; |
75 | INIT_LIST_HEAD(&exts->actions); | 76 | exts->nr_actions = 0; |
77 | exts->actions = kcalloc(TCA_ACT_MAX_PRIO, sizeof(struct tc_action *), | ||
78 | GFP_KERNEL); | ||
79 | WARN_ON(!exts->actions); /* TODO: propagate the error to callers */ | ||
76 | #endif | 80 | #endif |
77 | exts->action = action; | 81 | exts->action = action; |
78 | exts->police = police; | 82 | exts->police = police; |
@@ -89,7 +93,7 @@ static inline int | |||
89 | tcf_exts_is_predicative(struct tcf_exts *exts) | 93 | tcf_exts_is_predicative(struct tcf_exts *exts) |
90 | { | 94 | { |
91 | #ifdef CONFIG_NET_CLS_ACT | 95 | #ifdef CONFIG_NET_CLS_ACT |
92 | return !list_empty(&exts->actions); | 96 | return exts->nr_actions; |
93 | #else | 97 | #else |
94 | return 0; | 98 | return 0; |
95 | #endif | 99 | #endif |
@@ -108,6 +112,20 @@ tcf_exts_is_available(struct tcf_exts *exts) | |||
108 | return tcf_exts_is_predicative(exts); | 112 | return tcf_exts_is_predicative(exts); |
109 | } | 113 | } |
110 | 114 | ||
115 | static inline void tcf_exts_to_list(const struct tcf_exts *exts, | ||
116 | struct list_head *actions) | ||
117 | { | ||
118 | #ifdef CONFIG_NET_CLS_ACT | ||
119 | int i; | ||
120 | |||
121 | for (i = 0; i < exts->nr_actions; i++) { | ||
122 | struct tc_action *a = exts->actions[i]; | ||
123 | |||
124 | list_add(&a->list, actions); | ||
125 | } | ||
126 | #endif | ||
127 | } | ||
128 | |||
111 | /** | 129 | /** |
112 | * tcf_exts_exec - execute tc filter extensions | 130 | * tcf_exts_exec - execute tc filter extensions |
113 | * @skb: socket buffer | 131 | * @skb: socket buffer |
@@ -124,12 +142,25 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts, | |||
124 | struct tcf_result *res) | 142 | struct tcf_result *res) |
125 | { | 143 | { |
126 | #ifdef CONFIG_NET_CLS_ACT | 144 | #ifdef CONFIG_NET_CLS_ACT |
127 | if (!list_empty(&exts->actions)) | 145 | if (exts->nr_actions) |
128 | return tcf_action_exec(skb, &exts->actions, res); | 146 | return tcf_action_exec(skb, exts->actions, exts->nr_actions, |
147 | res); | ||
129 | #endif | 148 | #endif |
130 | return 0; | 149 | return 0; |
131 | } | 150 | } |
132 | 151 | ||
152 | #ifdef CONFIG_NET_CLS_ACT | ||
153 | |||
154 | #define tc_no_actions(_exts) ((_exts)->nr_actions == 0) | ||
155 | #define tc_single_action(_exts) ((_exts)->nr_actions == 1) | ||
156 | |||
157 | #else /* CONFIG_NET_CLS_ACT */ | ||
158 | |||
159 | #define tc_no_actions(_exts) true | ||
160 | #define tc_single_action(_exts) false | ||
161 | |||
162 | #endif /* CONFIG_NET_CLS_ACT */ | ||
163 | |||
133 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, | 164 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, |
134 | struct nlattr **tb, struct nlattr *rate_tlv, | 165 | struct nlattr **tb, struct nlattr *rate_tlv, |
135 | struct tcf_exts *exts, bool ovr); | 166 | struct tcf_exts *exts, bool ovr); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 8e90dd28bb75..e1f96737c2a1 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -2115,22 +2115,17 @@ static inline bool ib_is_udata_cleared(struct ib_udata *udata, | |||
2115 | size_t len) | 2115 | size_t len) |
2116 | { | 2116 | { |
2117 | const void __user *p = udata->inbuf + offset; | 2117 | const void __user *p = udata->inbuf + offset; |
2118 | bool ret = false; | 2118 | bool ret; |
2119 | u8 *buf; | 2119 | u8 *buf; |
2120 | 2120 | ||
2121 | if (len > USHRT_MAX) | 2121 | if (len > USHRT_MAX) |
2122 | return false; | 2122 | return false; |
2123 | 2123 | ||
2124 | buf = kmalloc(len, GFP_KERNEL); | 2124 | buf = memdup_user(p, len); |
2125 | if (!buf) | 2125 | if (IS_ERR(buf)) |
2126 | return false; | 2126 | return false; |
2127 | 2127 | ||
2128 | if (copy_from_user(buf, p, len)) | ||
2129 | goto free; | ||
2130 | |||
2131 | ret = !memchr_inv(buf, 0, len); | 2128 | ret = !memchr_inv(buf, 0, len); |
2132 | |||
2133 | free: | ||
2134 | kfree(buf); | 2129 | kfree(buf); |
2135 | return ret; | 2130 | return ret; |
2136 | } | 2131 | } |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index da218fec6056..9e5fc168c8a3 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -339,7 +339,7 @@ enum bpf_func_id { | |||
339 | BPF_FUNC_skb_change_type, | 339 | BPF_FUNC_skb_change_type, |
340 | 340 | ||
341 | /** | 341 | /** |
342 | * bpf_skb_in_cgroup(skb, map, index) - Check cgroup2 membership of skb | 342 | * bpf_skb_under_cgroup(skb, map, index) - Check cgroup2 membership of skb |
343 | * @skb: pointer to skb | 343 | * @skb: pointer to skb |
344 | * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type | 344 | * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type |
345 | * @index: index of the cgroup in the bpf_map | 345 | * @index: index of the cgroup in the bpf_map |
@@ -348,7 +348,7 @@ enum bpf_func_id { | |||
348 | * == 1 skb succeeded the cgroup2 descendant test | 348 | * == 1 skb succeeded the cgroup2 descendant test |
349 | * < 0 error | 349 | * < 0 error |
350 | */ | 350 | */ |
351 | BPF_FUNC_skb_in_cgroup, | 351 | BPF_FUNC_skb_under_cgroup, |
352 | 352 | ||
353 | /** | 353 | /** |
354 | * bpf_get_hash_recalc(skb) | 354 | * bpf_get_hash_recalc(skb) |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 01751faccaf8..c674ba2563b7 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
@@ -24,7 +24,7 @@ enum nft_registers { | |||
24 | __NFT_REG_MAX, | 24 | __NFT_REG_MAX, |
25 | 25 | ||
26 | NFT_REG32_00 = 8, | 26 | NFT_REG32_00 = 8, |
27 | MFT_REG32_01, | 27 | NFT_REG32_01, |
28 | NFT_REG32_02, | 28 | NFT_REG32_02, |
29 | NFT_REG32_03, | 29 | NFT_REG32_03, |
30 | NFT_REG32_04, | 30 | NFT_REG32_04, |
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h index d304f4c9792c..a406adcc0793 100644 --- a/include/uapi/linux/sctp.h +++ b/include/uapi/linux/sctp.h | |||
@@ -944,4 +944,68 @@ struct sctp_default_prinfo { | |||
944 | __u16 pr_policy; | 944 | __u16 pr_policy; |
945 | }; | 945 | }; |
946 | 946 | ||
947 | struct sctp_info { | ||
948 | __u32 sctpi_tag; | ||
949 | __u32 sctpi_state; | ||
950 | __u32 sctpi_rwnd; | ||
951 | __u16 sctpi_unackdata; | ||
952 | __u16 sctpi_penddata; | ||
953 | __u16 sctpi_instrms; | ||
954 | __u16 sctpi_outstrms; | ||
955 | __u32 sctpi_fragmentation_point; | ||
956 | __u32 sctpi_inqueue; | ||
957 | __u32 sctpi_outqueue; | ||
958 | __u32 sctpi_overall_error; | ||
959 | __u32 sctpi_max_burst; | ||
960 | __u32 sctpi_maxseg; | ||
961 | __u32 sctpi_peer_rwnd; | ||
962 | __u32 sctpi_peer_tag; | ||
963 | __u8 sctpi_peer_capable; | ||
964 | __u8 sctpi_peer_sack; | ||
965 | __u16 __reserved1; | ||
966 | |||
967 | /* assoc status info */ | ||
968 | __u64 sctpi_isacks; | ||
969 | __u64 sctpi_osacks; | ||
970 | __u64 sctpi_opackets; | ||
971 | __u64 sctpi_ipackets; | ||
972 | __u64 sctpi_rtxchunks; | ||
973 | __u64 sctpi_outofseqtsns; | ||
974 | __u64 sctpi_idupchunks; | ||
975 | __u64 sctpi_gapcnt; | ||
976 | __u64 sctpi_ouodchunks; | ||
977 | __u64 sctpi_iuodchunks; | ||
978 | __u64 sctpi_oodchunks; | ||
979 | __u64 sctpi_iodchunks; | ||
980 | __u64 sctpi_octrlchunks; | ||
981 | __u64 sctpi_ictrlchunks; | ||
982 | |||
983 | /* primary transport info */ | ||
984 | struct sockaddr_storage sctpi_p_address; | ||
985 | __s32 sctpi_p_state; | ||
986 | __u32 sctpi_p_cwnd; | ||
987 | __u32 sctpi_p_srtt; | ||
988 | __u32 sctpi_p_rto; | ||
989 | __u32 sctpi_p_hbinterval; | ||
990 | __u32 sctpi_p_pathmaxrxt; | ||
991 | __u32 sctpi_p_sackdelay; | ||
992 | __u32 sctpi_p_sackfreq; | ||
993 | __u32 sctpi_p_ssthresh; | ||
994 | __u32 sctpi_p_partial_bytes_acked; | ||
995 | __u32 sctpi_p_flight_size; | ||
996 | __u16 sctpi_p_error; | ||
997 | __u16 __reserved2; | ||
998 | |||
999 | /* sctp sock info */ | ||
1000 | __u32 sctpi_s_autoclose; | ||
1001 | __u32 sctpi_s_adaptation_ind; | ||
1002 | __u32 sctpi_s_pd_point; | ||
1003 | __u8 sctpi_s_nodelay; | ||
1004 | __u8 sctpi_s_disable_fragments; | ||
1005 | __u8 sctpi_s_v4mapped; | ||
1006 | __u8 sctpi_s_frag_interleave; | ||
1007 | __u32 sctpi_s_type; | ||
1008 | __u32 __reserved3; | ||
1009 | }; | ||
1010 | |||
947 | #endif /* _UAPI_SCTP_H */ | 1011 | #endif /* _UAPI_SCTP_H */ |
diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h index 6b011c19b50f..1d57ed3d84d2 100644 --- a/include/uapi/linux/virtio_vsock.h +++ b/include/uapi/linux/virtio_vsock.h | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef _UAPI_LINUX_VIRTIO_VSOCK_H | 34 | #ifndef _UAPI_LINUX_VIRTIO_VSOCK_H |
35 | #define _UAPI_LINUX_VIRTIO_VOSCK_H | 35 | #define _UAPI_LINUX_VIRTIO_VSOCK_H |
36 | 36 | ||
37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
38 | #include <linux/virtio_ids.h> | 38 | #include <linux/virtio_ids.h> |
diff --git a/include/uapi/misc/cxl.h b/include/uapi/misc/cxl.h index cbae529b7ce0..180d526a55c3 100644 --- a/include/uapi/misc/cxl.h +++ b/include/uapi/misc/cxl.h | |||
@@ -136,8 +136,8 @@ struct cxl_event_afu_driver_reserved { | |||
136 | * | 136 | * |
137 | * Of course the contents will be ABI, but that's up the AFU driver. | 137 | * Of course the contents will be ABI, but that's up the AFU driver. |
138 | */ | 138 | */ |
139 | size_t data_size; | 139 | __u32 data_size; |
140 | u8 data[]; | 140 | __u8 data[]; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | struct cxl_event { | 143 | struct cxl_event { |
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 9a37c541822f..b5486e648607 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
@@ -9,8 +9,8 @@ | |||
9 | 9 | ||
10 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); | 10 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); |
11 | 11 | ||
12 | DECLARE_PER_CPU(int, xen_vcpu_id); | 12 | DECLARE_PER_CPU(uint32_t, xen_vcpu_id); |
13 | static inline int xen_vcpu_nr(int cpu) | 13 | static inline uint32_t xen_vcpu_nr(int cpu) |
14 | { | 14 | { |
15 | return per_cpu(xen_vcpu_id, cpu); | 15 | return per_cpu(xen_vcpu_id, cpu); |
16 | } | 16 | } |