Gentoo Archives: gentoo-commits

From: Alice Ferrazzi <alicef@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.14 commit in: /
Date: Wed, 10 Feb 2021 10:07:46
Message-Id: 1612951647.3e05893dec2e2a2d507e8c22fff90e5a5abe452c.alicef@gentoo
1 commit: 3e05893dec2e2a2d507e8c22fff90e5a5abe452c
2 Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 10 10:07:15 2021 +0000
4 Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 10 10:07:27 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3e05893d
7
8 Linux patch 4.14.221
9
10 Signed-off-by: Alice Ferrazzi <alicef <AT> gentoo.org>
11
12 0000_README | 4 +
13 1220_linux-4.14.221.patch | 972 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 976 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index c5aa598..a3da73a 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -923,6 +923,10 @@ Patch: 1219_linux-4.14.220.patch
21 From: https://www.kernel.org
22 Desc: Linux 4.14.220
23
24 +Patch: 1220_linux-4.14.221.patch
25 +From: https://www.kernel.org
26 +Desc: Linux 4.14.221
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1220_linux-4.14.221.patch b/1220_linux-4.14.221.patch
33 new file mode 100644
34 index 0000000..45f0d80
35 --- /dev/null
36 +++ b/1220_linux-4.14.221.patch
37 @@ -0,0 +1,972 @@
38 +diff --git a/Makefile b/Makefile
39 +index 088dc5383dcf2..b25ce26c1cd71 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 4
45 + PATCHLEVEL = 14
46 +-SUBLEVEL = 220
47 ++SUBLEVEL = 221
48 + EXTRAVERSION =
49 + NAME = Petit Gorille
50 +
51 +@@ -844,12 +844,6 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
52 + # change __FILE__ to the relative path from the srctree
53 + KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
54 +
55 +-# ensure -fcf-protection is disabled when using retpoline as it is
56 +-# incompatible with -mindirect-branch=thunk-extern
57 +-ifdef CONFIG_RETPOLINE
58 +-KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
59 +-endif
60 +-
61 + # use the deterministic mode of AR if available
62 + KBUILD_ARFLAGS := $(call ar-option,D)
63 +
64 +diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
65 +index 96a3d73ef4bf4..fd6c9169fa78e 100644
66 +--- a/arch/arm/mach-footbridge/dc21285.c
67 ++++ b/arch/arm/mach-footbridge/dc21285.c
68 +@@ -69,15 +69,15 @@ dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where,
69 + if (addr)
70 + switch (size) {
71 + case 1:
72 +- asm("ldrb %0, [%1, %2]"
73 ++ asm volatile("ldrb %0, [%1, %2]"
74 + : "=r" (v) : "r" (addr), "r" (where) : "cc");
75 + break;
76 + case 2:
77 +- asm("ldrh %0, [%1, %2]"
78 ++ asm volatile("ldrh %0, [%1, %2]"
79 + : "=r" (v) : "r" (addr), "r" (where) : "cc");
80 + break;
81 + case 4:
82 +- asm("ldr %0, [%1, %2]"
83 ++ asm volatile("ldr %0, [%1, %2]"
84 + : "=r" (v) : "r" (addr), "r" (where) : "cc");
85 + break;
86 + }
87 +@@ -103,17 +103,17 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,
88 + if (addr)
89 + switch (size) {
90 + case 1:
91 +- asm("strb %0, [%1, %2]"
92 ++ asm volatile("strb %0, [%1, %2]"
93 + : : "r" (value), "r" (addr), "r" (where)
94 + : "cc");
95 + break;
96 + case 2:
97 +- asm("strh %0, [%1, %2]"
98 ++ asm volatile("strh %0, [%1, %2]"
99 + : : "r" (value), "r" (addr), "r" (where)
100 + : "cc");
101 + break;
102 + case 4:
103 +- asm("str %0, [%1, %2]"
104 ++ asm volatile("str %0, [%1, %2]"
105 + : : "r" (value), "r" (addr), "r" (where)
106 + : "cc");
107 + break;
108 +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
109 +index c8ff0baddf1d0..cb49d21e317c0 100644
110 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
111 ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
112 +@@ -304,7 +304,7 @@
113 +
114 + dcfg: dcfg@1ee0000 {
115 + compatible = "fsl,ls1046a-dcfg", "syscon";
116 +- reg = <0x0 0x1ee0000 0x0 0x10000>;
117 ++ reg = <0x0 0x1ee0000 0x0 0x1000>;
118 + big-endian;
119 + };
120 +
121 +diff --git a/arch/x86/Makefile b/arch/x86/Makefile
122 +index 3dc54d2f79c4e..4c8e9f12b0c4d 100644
123 +--- a/arch/x86/Makefile
124 ++++ b/arch/x86/Makefile
125 +@@ -138,6 +138,9 @@ else
126 + KBUILD_CFLAGS += -mno-red-zone
127 + KBUILD_CFLAGS += -mcmodel=kernel
128 +
129 ++ # Intel CET isn't enabled in the kernel
130 ++ KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
131 ++
132 + # -funit-at-a-time shrinks the kernel .text considerably
133 + # unfortunately it makes reading oopses harder.
134 + KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
135 +diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
136 +index 25a5a5c6ae90a..95f59f5dffb32 100644
137 +--- a/arch/x86/include/asm/apic.h
138 ++++ b/arch/x86/include/asm/apic.h
139 +@@ -174,16 +174,6 @@ static inline void lapic_update_tsc_freq(void) { }
140 + #endif /* !CONFIG_X86_LOCAL_APIC */
141 +
142 + #ifdef CONFIG_X86_X2APIC
143 +-/*
144 +- * Make previous memory operations globally visible before
145 +- * sending the IPI through x2apic wrmsr. We need a serializing instruction or
146 +- * mfence for this.
147 +- */
148 +-static inline void x2apic_wrmsr_fence(void)
149 +-{
150 +- asm volatile("mfence" : : : "memory");
151 +-}
152 +-
153 + static inline void native_apic_msr_write(u32 reg, u32 v)
154 + {
155 + if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
156 +diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
157 +index bc88797cfa615..3895a7b6952bf 100644
158 +--- a/arch/x86/include/asm/barrier.h
159 ++++ b/arch/x86/include/asm/barrier.h
160 +@@ -111,4 +111,22 @@ do { \
161 +
162 + #include <asm-generic/barrier.h>
163 +
164 ++/*
165 ++ * Make previous memory operations globally visible before
166 ++ * a WRMSR.
167 ++ *
168 ++ * MFENCE makes writes visible, but only affects load/store
169 ++ * instructions. WRMSR is unfortunately not a load/store
170 ++ * instruction and is unaffected by MFENCE. The LFENCE ensures
171 ++ * that the WRMSR is not reordered.
172 ++ *
173 ++ * Most WRMSRs are full serializing instructions themselves and
174 ++ * do not require this barrier. This is only required for the
175 ++ * IA32_TSC_DEADLINE and X2APIC MSRs.
176 ++ */
177 ++static inline void weak_wrmsr_fence(void)
178 ++{
179 ++ asm volatile("mfence; lfence" : : : "memory");
180 ++}
181 ++
182 + #endif /* _ASM_X86_BARRIER_H */
183 +diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
184 +index ee33f09513223..76f2bbba92f98 100644
185 +--- a/arch/x86/kernel/apic/apic.c
186 ++++ b/arch/x86/kernel/apic/apic.c
187 +@@ -42,6 +42,7 @@
188 + #include <asm/x86_init.h>
189 + #include <asm/pgalloc.h>
190 + #include <linux/atomic.h>
191 ++#include <asm/barrier.h>
192 + #include <asm/mpspec.h>
193 + #include <asm/i8259.h>
194 + #include <asm/proto.h>
195 +@@ -473,6 +474,9 @@ static int lapic_next_deadline(unsigned long delta,
196 + {
197 + u64 tsc;
198 +
199 ++ /* This MSR is special and need a special fence: */
200 ++ weak_wrmsr_fence();
201 ++
202 + tsc = rdtsc();
203 + wrmsrl(MSR_IA32_TSC_DEADLINE, tsc + (((u64) delta) * TSC_DIVISOR));
204 + return 0;
205 +diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
206 +index e216cf3d64d2e..32c5dba6f1bbc 100644
207 +--- a/arch/x86/kernel/apic/x2apic_cluster.c
208 ++++ b/arch/x86/kernel/apic/x2apic_cluster.c
209 +@@ -29,7 +29,8 @@ static void x2apic_send_IPI(int cpu, int vector)
210 + {
211 + u32 dest = per_cpu(x86_cpu_to_logical_apicid, cpu);
212 +
213 +- x2apic_wrmsr_fence();
214 ++ /* x2apic MSRs are special and need a special fence: */
215 ++ weak_wrmsr_fence();
216 + __x2apic_send_IPI_dest(dest, vector, APIC_DEST_LOGICAL);
217 + }
218 +
219 +@@ -42,7 +43,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
220 + unsigned long flags;
221 + u32 dest;
222 +
223 +- x2apic_wrmsr_fence();
224 ++ /* x2apic MSRs are special and need a special fence: */
225 ++ weak_wrmsr_fence();
226 +
227 + local_irq_save(flags);
228 +
229 +diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
230 +index b94d35320f85e..98716a4be0a7c 100644
231 +--- a/arch/x86/kernel/apic/x2apic_phys.c
232 ++++ b/arch/x86/kernel/apic/x2apic_phys.c
233 +@@ -41,7 +41,8 @@ static void x2apic_send_IPI(int cpu, int vector)
234 + {
235 + u32 dest = per_cpu(x86_cpu_to_apicid, cpu);
236 +
237 +- x2apic_wrmsr_fence();
238 ++ /* x2apic MSRs are special and need a special fence: */
239 ++ weak_wrmsr_fence();
240 + __x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL);
241 + }
242 +
243 +@@ -52,7 +53,8 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
244 + unsigned long this_cpu;
245 + unsigned long flags;
246 +
247 +- x2apic_wrmsr_fence();
248 ++ /* x2apic MSRs are special and need a special fence: */
249 ++ weak_wrmsr_fence();
250 +
251 + local_irq_save(flags);
252 +
253 +diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
254 +index 637f1347cd13d..815b69d35722c 100644
255 +--- a/drivers/input/joystick/xpad.c
256 ++++ b/drivers/input/joystick/xpad.c
257 +@@ -232,9 +232,17 @@ static const struct xpad_device {
258 + { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
259 + { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
260 + { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE },
261 +- { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
262 ++ { 0x0e6f, 0x02a0, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
263 ++ { 0x0e6f, 0x02a1, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
264 ++ { 0x0e6f, 0x02a2, "PDP Wired Controller for Xbox One - Crimson Red", 0, XTYPE_XBOXONE },
265 + { 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
266 + { 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE },
267 ++ { 0x0e6f, 0x02a7, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
268 ++ { 0x0e6f, 0x02a8, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
269 ++ { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
270 ++ { 0x0e6f, 0x02ad, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
271 ++ { 0x0e6f, 0x02b3, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE },
272 ++ { 0x0e6f, 0x02b8, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE },
273 + { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
274 + { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE },
275 + { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
276 +@@ -313,6 +321,9 @@ static const struct xpad_device {
277 + { 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 },
278 + { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
279 + { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
280 ++ { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
281 ++ { 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
282 ++ { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE },
283 + { 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
284 + { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
285 + { 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
286 +@@ -446,8 +457,12 @@ static const struct usb_device_id xpad_table[] = {
287 + XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
288 + XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
289 + XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
290 ++ XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */
291 ++ XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */
292 + XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
293 + XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */
294 ++ XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */
295 ++ XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */
296 + { }
297 + };
298 +
299 +diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
300 +index b256e3006a6fb..844875df8cad7 100644
301 +--- a/drivers/input/serio/i8042-x86ia64io.h
302 ++++ b/drivers/input/serio/i8042-x86ia64io.h
303 +@@ -223,6 +223,8 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
304 + DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
305 + DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
306 + },
307 ++ },
308 ++ {
309 + .matches = {
310 + DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"),
311 + DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
312 +diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
313 +index db1b546134f59..74bfd7d293380 100644
314 +--- a/drivers/iommu/intel-iommu.c
315 ++++ b/drivers/iommu/intel-iommu.c
316 +@@ -3338,6 +3338,12 @@ static int __init init_dmars(void)
317 +
318 + if (!ecap_pass_through(iommu->ecap))
319 + hw_pass_through = 0;
320 ++
321 ++ if (!intel_iommu_strict && cap_caching_mode(iommu->cap)) {
322 ++ pr_info("Disable batched IOTLB flush due to virtualization");
323 ++ intel_iommu_strict = 1;
324 ++ }
325 ++
326 + #ifdef CONFIG_INTEL_IOMMU_SVM
327 + if (pasid_enabled(iommu))
328 + intel_svm_alloc_pasid_tables(iommu);
329 +diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
330 +index 2ca5cd79018b4..dca72444b3122 100644
331 +--- a/drivers/mmc/core/sdio_cis.c
332 ++++ b/drivers/mmc/core/sdio_cis.c
333 +@@ -24,6 +24,8 @@
334 + #include "sdio_cis.h"
335 + #include "sdio_ops.h"
336 +
337 ++#define SDIO_READ_CIS_TIMEOUT_MS (10 * 1000) /* 10s */
338 ++
339 + static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
340 + const unsigned char *buf, unsigned size)
341 + {
342 +@@ -270,6 +272,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
343 +
344 + do {
345 + unsigned char tpl_code, tpl_link;
346 ++ unsigned long timeout = jiffies +
347 ++ msecs_to_jiffies(SDIO_READ_CIS_TIMEOUT_MS);
348 +
349 + ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code);
350 + if (ret)
351 +@@ -322,6 +326,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
352 + prev = &this->next;
353 +
354 + if (ret == -ENOENT) {
355 ++ if (time_after(jiffies, timeout))
356 ++ break;
357 + /* warn about unknown tuples */
358 + pr_warn_ratelimited("%s: queuing unknown"
359 + " CIS tuple 0x%02x (%u bytes)\n",
360 +diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
361 +index f4268f0322663..7ab4cc0962ace 100644
362 +--- a/drivers/net/dsa/mv88e6xxx/chip.c
363 ++++ b/drivers/net/dsa/mv88e6xxx/chip.c
364 +@@ -1364,7 +1364,11 @@ static int mv88e6xxx_port_db_load_purge(struct mv88e6xxx_chip *chip, int port,
365 + if (!entry.portvec)
366 + entry.state = MV88E6XXX_G1_ATU_DATA_STATE_UNUSED;
367 + } else {
368 +- entry.portvec |= BIT(port);
369 ++ if (state == MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC)
370 ++ entry.portvec = BIT(port);
371 ++ else
372 ++ entry.portvec |= BIT(port);
373 ++
374 + entry.state = state;
375 + }
376 +
377 +diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
378 +index 540fab9f850dd..92f269a0846c6 100644
379 +--- a/drivers/nvme/host/pci.c
380 ++++ b/drivers/nvme/host/pci.c
381 +@@ -2588,6 +2588,8 @@ static const struct pci_device_id nvme_id_table[] = {
382 + { PCI_DEVICE(0x1d1d, 0x2601), /* CNEX Granby */
383 + .driver_data = NVME_QUIRK_LIGHTNVM, },
384 + { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
385 ++ { PCI_DEVICE(0x2646, 0x2263), /* KINGSTON A2000 NVMe SSD */
386 ++ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
387 + { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
388 + { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
389 + { 0, }
390 +diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
391 +index 21a51a15893bb..f69a0a0b7266b 100644
392 +--- a/drivers/usb/class/usblp.c
393 ++++ b/drivers/usb/class/usblp.c
394 +@@ -1340,14 +1340,17 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
395 + if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
396 + return -EINVAL;
397 +
398 +- alts = usblp->protocol[protocol].alt_setting;
399 +- if (alts < 0)
400 +- return -EINVAL;
401 +- r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
402 +- if (r < 0) {
403 +- printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
404 +- alts, usblp->ifnum);
405 +- return r;
406 ++ /* Don't unnecessarily set the interface if there's a single alt. */
407 ++ if (usblp->intf->num_altsetting > 1) {
408 ++ alts = usblp->protocol[protocol].alt_setting;
409 ++ if (alts < 0)
410 ++ return -EINVAL;
411 ++ r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
412 ++ if (r < 0) {
413 ++ printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
414 ++ alts, usblp->ifnum);
415 ++ return r;
416 ++ }
417 + }
418 +
419 + usblp->bidir = (usblp->protocol[protocol].epread != NULL);
420 +diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
421 +index d2d4067a1a5f4..aab2f6cbd524f 100644
422 +--- a/drivers/usb/dwc2/gadget.c
423 ++++ b/drivers/usb/dwc2/gadget.c
424 +@@ -1470,7 +1470,6 @@ static void dwc2_hsotg_complete_oursetup(struct usb_ep *ep,
425 + static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,
426 + u32 windex)
427 + {
428 +- struct dwc2_hsotg_ep *ep;
429 + int dir = (windex & USB_DIR_IN) ? 1 : 0;
430 + int idx = windex & 0x7F;
431 +
432 +@@ -1480,12 +1479,7 @@ static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg,
433 + if (idx > hsotg->num_of_eps)
434 + return NULL;
435 +
436 +- ep = index_to_ep(hsotg, idx, dir);
437 +-
438 +- if (idx && ep->dir_in != dir)
439 +- return NULL;
440 +-
441 +- return ep;
442 ++ return index_to_ep(hsotg, idx, dir);
443 + }
444 +
445 + /**
446 +diff --git a/drivers/usb/gadget/legacy/ether.c b/drivers/usb/gadget/legacy/ether.c
447 +index 25a2c2e485920..3396e7193dba2 100644
448 +--- a/drivers/usb/gadget/legacy/ether.c
449 ++++ b/drivers/usb/gadget/legacy/ether.c
450 +@@ -407,8 +407,10 @@ static int eth_bind(struct usb_composite_dev *cdev)
451 + struct usb_descriptor_header *usb_desc;
452 +
453 + usb_desc = usb_otg_descriptor_alloc(gadget);
454 +- if (!usb_desc)
455 ++ if (!usb_desc) {
456 ++ status = -ENOMEM;
457 + goto fail1;
458 ++ }
459 + usb_otg_descriptor_init(gadget, usb_desc);
460 + otg_desc[0] = usb_desc;
461 + otg_desc[1] = NULL;
462 +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
463 +index 0c5b2c75b8713..748d4c69cb28a 100644
464 +--- a/drivers/usb/host/xhci-ring.c
465 ++++ b/drivers/usb/host/xhci-ring.c
466 +@@ -681,11 +681,16 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,
467 + dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len,
468 + DMA_FROM_DEVICE);
469 + /* for in tranfers we need to copy the data from bounce to sg */
470 +- len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
471 +- seg->bounce_len, seg->bounce_offs);
472 +- if (len != seg->bounce_len)
473 +- xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
474 +- len, seg->bounce_len);
475 ++ if (urb->num_sgs) {
476 ++ len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
477 ++ seg->bounce_len, seg->bounce_offs);
478 ++ if (len != seg->bounce_len)
479 ++ xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
480 ++ len, seg->bounce_len);
481 ++ } else {
482 ++ memcpy(urb->transfer_buffer + seg->bounce_offs, seg->bounce_buf,
483 ++ seg->bounce_len);
484 ++ }
485 + seg->bounce_len = 0;
486 + seg->bounce_offs = 0;
487 + }
488 +@@ -3252,12 +3257,16 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,
489 +
490 + /* create a max max_pkt sized bounce buffer pointed to by last trb */
491 + if (usb_urb_dir_out(urb)) {
492 +- len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs,
493 +- seg->bounce_buf, new_buff_len, enqd_len);
494 +- if (len != new_buff_len)
495 +- xhci_warn(xhci,
496 +- "WARN Wrong bounce buffer write length: %zu != %d\n",
497 +- len, new_buff_len);
498 ++ if (urb->num_sgs) {
499 ++ len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs,
500 ++ seg->bounce_buf, new_buff_len, enqd_len);
501 ++ if (len != new_buff_len)
502 ++ xhci_warn(xhci, "WARN Wrong bounce buffer write length: %zu != %d\n",
503 ++ len, new_buff_len);
504 ++ } else {
505 ++ memcpy(seg->bounce_buf, urb->transfer_buffer + enqd_len, new_buff_len);
506 ++ }
507 ++
508 + seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
509 + max_pkt, DMA_TO_DEVICE);
510 + } else {
511 +diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
512 +index 630c8338d7912..2d07364e93023 100644
513 +--- a/drivers/usb/serial/cp210x.c
514 ++++ b/drivers/usb/serial/cp210x.c
515 +@@ -64,6 +64,7 @@ static const struct usb_device_id id_table[] = {
516 + { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
517 + { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
518 + { USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
519 ++ { USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */
520 + { USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
521 + { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
522 + { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
523 +@@ -204,6 +205,7 @@ static const struct usb_device_id id_table[] = {
524 + { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
525 + { USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */
526 + { USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */
527 ++ { USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */
528 + { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
529 + { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
530 + { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
531 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
532 +index 27549e80e0b16..22e119774cb3d 100644
533 +--- a/drivers/usb/serial/option.c
534 ++++ b/drivers/usb/serial/option.c
535 +@@ -428,6 +428,8 @@ static void option_instat_callback(struct urb *urb);
536 + #define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
537 + #define CINTERION_PRODUCT_AHXX_AUDIO 0x0085
538 + #define CINTERION_PRODUCT_CLS8 0x00b0
539 ++#define CINTERION_PRODUCT_MV31_MBIM 0x00b3
540 ++#define CINTERION_PRODUCT_MV31_RMNET 0x00b7
541 +
542 + /* Olivetti products */
543 + #define OLIVETTI_VENDOR_ID 0x0b3c
544 +@@ -1917,6 +1919,10 @@ static const struct usb_device_id option_ids[] = {
545 + { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) },
546 + { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */
547 + { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
548 ++ { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff),
549 ++ .driver_info = RSVD(3)},
550 ++ { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff),
551 ++ .driver_info = RSVD(0)},
552 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
553 + .driver_info = RSVD(4) },
554 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
555 +diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
556 +index 03293e543c075..b92804ff3b333 100644
557 +--- a/fs/cifs/dir.c
558 ++++ b/fs/cifs/dir.c
559 +@@ -841,6 +841,7 @@ static int
560 + cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
561 + {
562 + struct inode *inode;
563 ++ int rc;
564 +
565 + if (flags & LOOKUP_RCU)
566 + return -ECHILD;
567 +@@ -850,8 +851,25 @@ cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
568 + if ((flags & LOOKUP_REVAL) && !CIFS_CACHE_READ(CIFS_I(inode)))
569 + CIFS_I(inode)->time = 0; /* force reval */
570 +
571 +- if (cifs_revalidate_dentry(direntry))
572 +- return 0;
573 ++ rc = cifs_revalidate_dentry(direntry);
574 ++ if (rc) {
575 ++ cifs_dbg(FYI, "cifs_revalidate_dentry failed with rc=%d", rc);
576 ++ switch (rc) {
577 ++ case -ENOENT:
578 ++ case -ESTALE:
579 ++ /*
580 ++ * Those errors mean the dentry is invalid
581 ++ * (file was deleted or recreated)
582 ++ */
583 ++ return 0;
584 ++ default:
585 ++ /*
586 ++ * Otherwise some unexpected error happened
587 ++ * report it as-is to VFS layer
588 ++ */
589 ++ return rc;
590 ++ }
591 ++ }
592 + else {
593 + /*
594 + * If the inode wasn't known to be a dfs entry when
595 +diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
596 +index f8baa54c83008..407425d31b2eb 100644
597 +--- a/fs/cifs/smb2pdu.h
598 ++++ b/fs/cifs/smb2pdu.h
599 +@@ -206,7 +206,7 @@ struct smb2_negotiate_req {
600 + __le32 NegotiateContextOffset; /* SMB3.1.1 only. MBZ earlier */
601 + __le16 NegotiateContextCount; /* SMB3.1.1 only. MBZ earlier */
602 + __le16 Reserved2;
603 +- __le16 Dialects[1]; /* One dialect (vers=) at a time for now */
604 ++ __le16 Dialects[4]; /* BB expand this if autonegotiate > 4 dialects */
605 + } __packed;
606 +
607 + /* Dialects */
608 +diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
609 +index ba54a0e12bbd0..94fc833119e47 100644
610 +--- a/fs/hugetlbfs/inode.c
611 ++++ b/fs/hugetlbfs/inode.c
612 +@@ -649,8 +649,9 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,
613 +
614 + mutex_unlock(&hugetlb_fault_mutex_table[hash]);
615 +
616 ++ set_page_huge_active(page);
617 + /*
618 +- * page_put due to reference from alloc_huge_page()
619 ++ * put_page() due to reference from alloc_huge_page()
620 + * unlock_page because locked by add_to_page_cache()
621 + */
622 + put_page(page);
623 +diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
624 +index 8c561703275a5..5bdc85ad13a2f 100644
625 +--- a/fs/overlayfs/dir.c
626 ++++ b/fs/overlayfs/dir.c
627 +@@ -850,8 +850,8 @@ static char *ovl_get_redirect(struct dentry *dentry, bool samedir)
628 +
629 + buflen -= thislen;
630 + memcpy(&buf[buflen], name, thislen);
631 +- tmp = dget_dlock(d->d_parent);
632 + spin_unlock(&d->d_lock);
633 ++ tmp = dget_parent(d);
634 +
635 + dput(d);
636 + d = tmp;
637 +diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
638 +index 4cad0e784b286..b81f9e1d74b0a 100644
639 +--- a/include/linux/elfcore.h
640 ++++ b/include/linux/elfcore.h
641 +@@ -58,6 +58,7 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse
642 + }
643 + #endif
644 +
645 ++#if defined(CONFIG_UM) || defined(CONFIG_IA64)
646 + /*
647 + * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
648 + * extra segments containing the gate DSO contents. Dumping its
649 +@@ -72,5 +73,26 @@ elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset);
650 + extern int
651 + elf_core_write_extra_data(struct coredump_params *cprm);
652 + extern size_t elf_core_extra_data_size(void);
653 ++#else
654 ++static inline Elf_Half elf_core_extra_phdrs(void)
655 ++{
656 ++ return 0;
657 ++}
658 ++
659 ++static inline int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
660 ++{
661 ++ return 1;
662 ++}
663 ++
664 ++static inline int elf_core_write_extra_data(struct coredump_params *cprm)
665 ++{
666 ++ return 1;
667 ++}
668 ++
669 ++static inline size_t elf_core_extra_data_size(void)
670 ++{
671 ++ return 0;
672 ++}
673 ++#endif
674 +
675 + #endif /* _LINUX_ELFCORE_H */
676 +diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
677 +index 50a07235032fd..7b152f9d63a48 100644
678 +--- a/include/linux/hugetlb.h
679 ++++ b/include/linux/hugetlb.h
680 +@@ -531,6 +531,9 @@ static inline void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr
681 + set_huge_pte_at(mm, addr, ptep, pte);
682 + }
683 + #endif
684 ++
685 ++void set_page_huge_active(struct page *page);
686 ++
687 + #else /* CONFIG_HUGETLB_PAGE */
688 + struct hstate {};
689 + #define alloc_huge_page(v, a, r) NULL
690 +diff --git a/kernel/Makefile b/kernel/Makefile
691 +index 43e92e3691ecc..38151285fca43 100644
692 +--- a/kernel/Makefile
693 ++++ b/kernel/Makefile
694 +@@ -90,7 +90,6 @@ obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
695 + obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
696 + obj-$(CONFIG_TRACEPOINTS) += tracepoint.o
697 + obj-$(CONFIG_LATENCYTOP) += latencytop.o
698 +-obj-$(CONFIG_ELFCORE) += elfcore.o
699 + obj-$(CONFIG_FUNCTION_TRACER) += trace/
700 + obj-$(CONFIG_TRACING) += trace/
701 + obj-$(CONFIG_TRACE_CLOCK) += trace/
702 +diff --git a/kernel/elfcore.c b/kernel/elfcore.c
703 +deleted file mode 100644
704 +index 57fb4dcff4349..0000000000000
705 +--- a/kernel/elfcore.c
706 ++++ /dev/null
707 +@@ -1,26 +0,0 @@
708 +-// SPDX-License-Identifier: GPL-2.0
709 +-#include <linux/elf.h>
710 +-#include <linux/fs.h>
711 +-#include <linux/mm.h>
712 +-#include <linux/binfmts.h>
713 +-#include <linux/elfcore.h>
714 +-
715 +-Elf_Half __weak elf_core_extra_phdrs(void)
716 +-{
717 +- return 0;
718 +-}
719 +-
720 +-int __weak elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
721 +-{
722 +- return 1;
723 +-}
724 +-
725 +-int __weak elf_core_write_extra_data(struct coredump_params *cprm)
726 +-{
727 +- return 1;
728 +-}
729 +-
730 +-size_t __weak elf_core_extra_data_size(void)
731 +-{
732 +- return 0;
733 +-}
734 +diff --git a/kernel/kprobes.c b/kernel/kprobes.c
735 +index fdf6656cce292..d752c1df8f3fd 100644
736 +--- a/kernel/kprobes.c
737 ++++ b/kernel/kprobes.c
738 +@@ -1989,6 +1989,10 @@ int register_kretprobe(struct kretprobe *rp)
739 + if (!kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset))
740 + return -EINVAL;
741 +
742 ++ /* If only rp->kp.addr is specified, check reregistering kprobes */
743 ++ if (rp->kp.addr && check_kprobe_rereg(&rp->kp))
744 ++ return -EINVAL;
745 ++
746 + if (kretprobe_blacklist_size) {
747 + addr = kprobe_addr(&rp->kp);
748 + if (IS_ERR(addr))
749 +diff --git a/mm/huge_memory.c b/mm/huge_memory.c
750 +index 5d9dd24d99c8b..9dbfa7286c611 100644
751 +--- a/mm/huge_memory.c
752 ++++ b/mm/huge_memory.c
753 +@@ -2198,7 +2198,7 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
754 + spinlock_t *ptl;
755 + struct mm_struct *mm = vma->vm_mm;
756 + unsigned long haddr = address & HPAGE_PMD_MASK;
757 +- bool was_locked = false;
758 ++ bool do_unlock_page = false;
759 + pmd_t _pmd;
760 +
761 + mmu_notifier_invalidate_range_start(mm, haddr, haddr + HPAGE_PMD_SIZE);
762 +@@ -2211,7 +2211,6 @@ void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
763 + VM_BUG_ON(freeze && !page);
764 + if (page) {
765 + VM_WARN_ON_ONCE(!PageLocked(page));
766 +- was_locked = true;
767 + if (page != pmd_page(*pmd))
768 + goto out;
769 + }
770 +@@ -2220,19 +2219,29 @@ repeat:
771 + if (pmd_trans_huge(*pmd)) {
772 + if (!page) {
773 + page = pmd_page(*pmd);
774 +- if (unlikely(!trylock_page(page))) {
775 +- get_page(page);
776 +- _pmd = *pmd;
777 +- spin_unlock(ptl);
778 +- lock_page(page);
779 +- spin_lock(ptl);
780 +- if (unlikely(!pmd_same(*pmd, _pmd))) {
781 +- unlock_page(page);
782 ++ /*
783 ++ * An anonymous page must be locked, to ensure that a
784 ++ * concurrent reuse_swap_page() sees stable mapcount;
785 ++ * but reuse_swap_page() is not used on shmem or file,
786 ++ * and page lock must not be taken when zap_pmd_range()
787 ++ * calls __split_huge_pmd() while i_mmap_lock is held.
788 ++ */
789 ++ if (PageAnon(page)) {
790 ++ if (unlikely(!trylock_page(page))) {
791 ++ get_page(page);
792 ++ _pmd = *pmd;
793 ++ spin_unlock(ptl);
794 ++ lock_page(page);
795 ++ spin_lock(ptl);
796 ++ if (unlikely(!pmd_same(*pmd, _pmd))) {
797 ++ unlock_page(page);
798 ++ put_page(page);
799 ++ page = NULL;
800 ++ goto repeat;
801 ++ }
802 + put_page(page);
803 +- page = NULL;
804 +- goto repeat;
805 + }
806 +- put_page(page);
807 ++ do_unlock_page = true;
808 + }
809 + }
810 + if (PageMlocked(page))
811 +@@ -2242,7 +2251,7 @@ repeat:
812 + __split_huge_pmd_locked(vma, pmd, haddr, freeze);
813 + out:
814 + spin_unlock(ptl);
815 +- if (!was_locked && page)
816 ++ if (do_unlock_page)
817 + unlock_page(page);
818 + mmu_notifier_invalidate_range_end(mm, haddr, haddr + HPAGE_PMD_SIZE);
819 + }
820 +diff --git a/mm/hugetlb.c b/mm/hugetlb.c
821 +index 3623eb037eee8..5f0d0f92adbf8 100644
822 +--- a/mm/hugetlb.c
823 ++++ b/mm/hugetlb.c
824 +@@ -1233,12 +1233,11 @@ struct hstate *size_to_hstate(unsigned long size)
825 + */
826 + bool page_huge_active(struct page *page)
827 + {
828 +- VM_BUG_ON_PAGE(!PageHuge(page), page);
829 +- return PageHead(page) && PagePrivate(&page[1]);
830 ++ return PageHeadHuge(page) && PagePrivate(&page[1]);
831 + }
832 +
833 + /* never called for tail page */
834 +-static void set_page_huge_active(struct page *page)
835 ++void set_page_huge_active(struct page *page)
836 + {
837 + VM_BUG_ON_PAGE(!PageHeadHuge(page), page);
838 + SetPagePrivate(&page[1]);
839 +@@ -4865,9 +4864,9 @@ bool isolate_huge_page(struct page *page, struct list_head *list)
840 + {
841 + bool ret = true;
842 +
843 +- VM_BUG_ON_PAGE(!PageHead(page), page);
844 + spin_lock(&hugetlb_lock);
845 +- if (!page_huge_active(page) || !get_page_unless_zero(page)) {
846 ++ if (!PageHeadHuge(page) || !page_huge_active(page) ||
847 ++ !get_page_unless_zero(page)) {
848 + ret = false;
849 + goto unlock;
850 + }
851 +diff --git a/net/ipv4/route.c b/net/ipv4/route.c
852 +index be7383d139c15..78d6bc61a1d87 100644
853 +--- a/net/ipv4/route.c
854 ++++ b/net/ipv4/route.c
855 +@@ -1437,6 +1437,24 @@ static bool rt_bind_exception(struct rtable *rt, struct fib_nh_exception *fnhe,
856 + return ret;
857 + }
858 +
859 ++struct uncached_list {
860 ++ spinlock_t lock;
861 ++ struct list_head head;
862 ++};
863 ++
864 ++static DEFINE_PER_CPU_ALIGNED(struct uncached_list, rt_uncached_list);
865 ++
866 ++static void rt_add_uncached_list(struct rtable *rt)
867 ++{
868 ++ struct uncached_list *ul = raw_cpu_ptr(&rt_uncached_list);
869 ++
870 ++ rt->rt_uncached_list = ul;
871 ++
872 ++ spin_lock_bh(&ul->lock);
873 ++ list_add_tail(&rt->rt_uncached, &ul->head);
874 ++ spin_unlock_bh(&ul->lock);
875 ++}
876 ++
877 + static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
878 + {
879 + struct rtable *orig, *prev, **p;
880 +@@ -1456,7 +1474,7 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
881 + prev = cmpxchg(p, orig, rt);
882 + if (prev == orig) {
883 + if (orig) {
884 +- dst_dev_put(&orig->dst);
885 ++ rt_add_uncached_list(orig);
886 + dst_release(&orig->dst);
887 + }
888 + } else {
889 +@@ -1467,24 +1485,6 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
890 + return ret;
891 + }
892 +
893 +-struct uncached_list {
894 +- spinlock_t lock;
895 +- struct list_head head;
896 +-};
897 +-
898 +-static DEFINE_PER_CPU_ALIGNED(struct uncached_list, rt_uncached_list);
899 +-
900 +-static void rt_add_uncached_list(struct rtable *rt)
901 +-{
902 +- struct uncached_list *ul = raw_cpu_ptr(&rt_uncached_list);
903 +-
904 +- rt->rt_uncached_list = ul;
905 +-
906 +- spin_lock_bh(&ul->lock);
907 +- list_add_tail(&rt->rt_uncached, &ul->head);
908 +- spin_unlock_bh(&ul->lock);
909 +-}
910 +-
911 + static void ipv4_dst_destroy(struct dst_entry *dst)
912 + {
913 + struct dst_metrics *p = (struct dst_metrics *)DST_METRICS_PTR(dst);
914 +diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c
915 +index eda726e22f645..621c66f001177 100644
916 +--- a/net/lapb/lapb_out.c
917 ++++ b/net/lapb/lapb_out.c
918 +@@ -87,7 +87,8 @@ void lapb_kick(struct lapb_cb *lapb)
919 + skb = skb_dequeue(&lapb->write_queue);
920 +
921 + do {
922 +- if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
923 ++ skbn = skb_copy(skb, GFP_ATOMIC);
924 ++ if (!skbn) {
925 + skb_queue_head(&lapb->write_queue, skb);
926 + break;
927 + }
928 +diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
929 +index f783d1377d9a8..9f0f437a09b95 100644
930 +--- a/net/mac80211/driver-ops.c
931 ++++ b/net/mac80211/driver-ops.c
932 +@@ -128,8 +128,11 @@ int drv_sta_state(struct ieee80211_local *local,
933 + } else if (old_state == IEEE80211_STA_AUTH &&
934 + new_state == IEEE80211_STA_ASSOC) {
935 + ret = drv_sta_add(local, sdata, &sta->sta);
936 +- if (ret == 0)
937 ++ if (ret == 0) {
938 + sta->uploaded = true;
939 ++ if (rcu_access_pointer(sta->sta.rates))
940 ++ drv_sta_rate_tbl_update(local, sdata, &sta->sta);
941 ++ }
942 + } else if (old_state == IEEE80211_STA_ASSOC &&
943 + new_state == IEEE80211_STA_AUTH) {
944 + drv_sta_remove(local, sdata, &sta->sta);
945 +diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
946 +index 76f303fda3eda..954b932fd7b86 100644
947 +--- a/net/mac80211/rate.c
948 ++++ b/net/mac80211/rate.c
949 +@@ -941,7 +941,8 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
950 + if (old)
951 + kfree_rcu(old, rcu_head);
952 +
953 +- drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
954 ++ if (sta->uploaded)
955 ++ drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
956 +
957 + ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta));
958 +
959 +diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
960 +index 18384d9be4e17..32a343d6600da 100644
961 +--- a/tools/objtool/orc_gen.c
962 ++++ b/tools/objtool/orc_gen.c
963 +@@ -98,11 +98,6 @@ static int create_orc_entry(struct section *u_sec, struct section *ip_relasec,
964 + struct orc_entry *orc;
965 + struct rela *rela;
966 +
967 +- if (!insn_sec->sym) {
968 +- WARN("missing symbol for section %s", insn_sec->name);
969 +- return -1;
970 +- }
971 +-
972 + /* populate ORC data */
973 + orc = (struct orc_entry *)u_sec->data->d_buf + idx;
974 + memcpy(orc, o, sizeof(*orc));
975 +@@ -115,8 +110,32 @@ static int create_orc_entry(struct section *u_sec, struct section *ip_relasec,
976 + }
977 + memset(rela, 0, sizeof(*rela));
978 +
979 +- rela->sym = insn_sec->sym;
980 +- rela->addend = insn_off;
981 ++ if (insn_sec->sym) {
982 ++ rela->sym = insn_sec->sym;
983 ++ rela->addend = insn_off;
984 ++ } else {
985 ++ /*
986 ++ * The Clang assembler doesn't produce section symbols, so we
987 ++ * have to reference the function symbol instead:
988 ++ */
989 ++ rela->sym = find_symbol_containing(insn_sec, insn_off);
990 ++ if (!rela->sym) {
991 ++ /*
992 ++ * Hack alert. This happens when we need to reference
993 ++ * the NOP pad insn immediately after the function.
994 ++ */
995 ++ rela->sym = find_symbol_containing(insn_sec,
996 ++ insn_off - 1);
997 ++ }
998 ++ if (!rela->sym) {
999 ++ WARN("missing symbol for insn at offset 0x%lx\n",
1000 ++ insn_off);
1001 ++ return -1;
1002 ++ }
1003 ++
1004 ++ rela->addend = insn_off - rela->sym->offset;
1005 ++ }
1006 ++
1007 + rela->type = R_X86_64_PC32;
1008 + rela->offset = idx * sizeof(int);
1009 +