Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.15 commit in: /
Date: Sun, 16 Jan 2022 10:21:19
Message-Id: 1642328462.4c322a8b51bba480d09d8fa86540ee5360c4d351.mpagano@gentoo
1 commit: 4c322a8b51bba480d09d8fa86540ee5360c4d351
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 16 10:21:02 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 16 10:21:02 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4c322a8b
7
8 Linux patch 5.15.15
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1014_linux-5.15.15.patch | 1160 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1164 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 4ce455a9..425166ce 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -99,6 +99,10 @@ Patch: 1013_linux-5.15.14.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.15.14
23
24 +Patch: 1014_linux-5.15.15.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.15.15
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/1014_linux-5.15.15.patch b/1014_linux-5.15.15.patch
33 new file mode 100644
34 index 00000000..9a4cbb50
35 --- /dev/null
36 +++ b/1014_linux-5.15.15.patch
37 @@ -0,0 +1,1160 @@
38 +diff --git a/Makefile b/Makefile
39 +index a469670e7675a..aed26e228ddef 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 15
46 +-SUBLEVEL = 14
47 ++SUBLEVEL = 15
48 + EXTRAVERSION =
49 + NAME = Trick or Treat
50 +
51 +diff --git a/arch/arm/boot/dts/exynos4210-i9100.dts b/arch/arm/boot/dts/exynos4210-i9100.dts
52 +index 55922176807e6..5f5d9b1357365 100644
53 +--- a/arch/arm/boot/dts/exynos4210-i9100.dts
54 ++++ b/arch/arm/boot/dts/exynos4210-i9100.dts
55 +@@ -827,7 +827,7 @@
56 + compatible = "brcm,bcm4330-bt";
57 +
58 + shutdown-gpios = <&gpl0 4 GPIO_ACTIVE_HIGH>;
59 +- reset-gpios = <&gpl1 0 GPIO_ACTIVE_HIGH>;
60 ++ reset-gpios = <&gpl1 0 GPIO_ACTIVE_LOW>;
61 + device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>;
62 + host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>;
63 + };
64 +diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
65 +index 76cd09879eaf4..a81d6c43b9b61 100644
66 +--- a/arch/s390/kernel/machine_kexec_file.c
67 ++++ b/arch/s390/kernel/machine_kexec_file.c
68 +@@ -312,6 +312,10 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
69 + addr = section->sh_addr + relas[i].r_offset;
70 +
71 + r_type = ELF64_R_TYPE(relas[i].r_info);
72 ++
73 ++ if (r_type == R_390_PLT32DBL)
74 ++ r_type = R_390_PC32DBL;
75 ++
76 + ret = arch_kexec_do_relocs(r_type, loc, val, addr);
77 + if (ret) {
78 + pr_err("Unknown rela relocation: %d\n", r_type);
79 +diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
80 +index 5a321b4076aab..cab93935cc7f1 100644
81 +--- a/drivers/bluetooth/bfusb.c
82 ++++ b/drivers/bluetooth/bfusb.c
83 +@@ -628,6 +628,9 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
84 + data->bulk_out_ep = bulk_out_ep->desc.bEndpointAddress;
85 + data->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);
86 +
87 ++ if (!data->bulk_pkt_size)
88 ++ goto done;
89 ++
90 + rwlock_init(&data->lock);
91 +
92 + data->reassembly = NULL;
93 +diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
94 +index e4182acee488c..d9ceca7a7935c 100644
95 +--- a/drivers/bluetooth/btbcm.c
96 ++++ b/drivers/bluetooth/btbcm.c
97 +@@ -8,6 +8,7 @@
98 +
99 + #include <linux/module.h>
100 + #include <linux/firmware.h>
101 ++#include <linux/dmi.h>
102 + #include <asm/unaligned.h>
103 +
104 + #include <net/bluetooth/bluetooth.h>
105 +@@ -343,6 +344,52 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
106 + return skb;
107 + }
108 +
109 ++static const struct dmi_system_id disable_broken_read_transmit_power[] = {
110 ++ {
111 ++ .matches = {
112 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
113 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"),
114 ++ },
115 ++ },
116 ++ {
117 ++ .matches = {
118 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
119 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"),
120 ++ },
121 ++ },
122 ++ {
123 ++ .matches = {
124 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
125 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,4"),
126 ++ },
127 ++ },
128 ++ {
129 ++ .matches = {
130 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
131 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir8,1"),
132 ++ },
133 ++ },
134 ++ {
135 ++ .matches = {
136 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
137 ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir8,2"),
138 ++ },
139 ++ },
140 ++ {
141 ++ .matches = {
142 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
143 ++ DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,1"),
144 ++ },
145 ++ },
146 ++ {
147 ++ .matches = {
148 ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
149 ++ DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,2"),
150 ++ },
151 ++ },
152 ++ { }
153 ++};
154 ++
155 + static int btbcm_read_info(struct hci_dev *hdev)
156 + {
157 + struct sk_buff *skb;
158 +@@ -363,6 +410,10 @@ static int btbcm_read_info(struct hci_dev *hdev)
159 + bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]);
160 + kfree_skb(skb);
161 +
162 ++ /* Read DMI and disable broken Read LE Min/Max Tx Power */
163 ++ if (dmi_first_match(disable_broken_read_transmit_power))
164 ++ set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
165 ++
166 + return 0;
167 + }
168 +
169 +diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
170 +index f1705b46fc889..525be2e1fbb25 100644
171 +--- a/drivers/bluetooth/btintel.c
172 ++++ b/drivers/bluetooth/btintel.c
173 +@@ -2193,8 +2193,15 @@ static int btintel_setup_combined(struct hci_dev *hdev)
174 + * As a workaround, send HCI Reset command first which will reset the
175 + * number of completed commands and allow normal command processing
176 + * from now on.
177 ++ *
178 ++ * Regarding the INTEL_BROKEN_SHUTDOWN_LED flag, these devices maybe
179 ++ * in the SW_RFKILL ON state as a workaround of fixing LED issue during
180 ++ * the shutdown() procedure, and once the device is in SW_RFKILL ON
181 ++ * state, the only way to exit out of it is sending the HCI_Reset
182 ++ * command.
183 + */
184 +- if (btintel_test_flag(hdev, INTEL_BROKEN_INITIAL_NCMD)) {
185 ++ if (btintel_test_flag(hdev, INTEL_BROKEN_INITIAL_NCMD) ||
186 ++ btintel_test_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED)) {
187 + skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL,
188 + HCI_INIT_TIMEOUT);
189 + if (IS_ERR(skb)) {
190 +@@ -2263,12 +2270,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
191 + set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
192 + &hdev->quirks);
193 +
194 +- /* These devices have an issue with LED which doesn't
195 +- * go off immediately during shutdown. Set the flag
196 +- * here to send the LED OFF command during shutdown.
197 +- */
198 +- btintel_set_flag(hdev, INTEL_BROKEN_LED);
199 +-
200 + err = btintel_legacy_rom_setup(hdev, &ver);
201 + break;
202 + case 0x0b: /* SfP */
203 +@@ -2399,9 +2400,10 @@ static int btintel_shutdown_combined(struct hci_dev *hdev)
204 +
205 + /* Some platforms have an issue with BT LED when the interface is
206 + * down or BT radio is turned off, which takes 5 seconds to BT LED
207 +- * goes off. This command turns off the BT LED immediately.
208 ++ * goes off. As a workaround, sends HCI_Intel_SW_RFKILL to put the
209 ++ * device in the RFKILL ON state which turns off the BT LED immediately.
210 + */
211 +- if (btintel_test_flag(hdev, INTEL_BROKEN_LED)) {
212 ++ if (btintel_test_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED)) {
213 + skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
214 + if (IS_ERR(skb)) {
215 + ret = PTR_ERR(skb);
216 +diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
217 +index aa64072bbe68d..704e3b7bcb77c 100644
218 +--- a/drivers/bluetooth/btintel.h
219 ++++ b/drivers/bluetooth/btintel.h
220 +@@ -145,7 +145,7 @@ enum {
221 + INTEL_FIRMWARE_FAILED,
222 + INTEL_BOOTING,
223 + INTEL_BROKEN_INITIAL_NCMD,
224 +- INTEL_BROKEN_LED,
225 ++ INTEL_BROKEN_SHUTDOWN_LED,
226 + INTEL_ROM_LEGACY,
227 +
228 + __INTEL_NUM_FLAGS,
229 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
230 +index 79d0db542da3b..fa44828562d32 100644
231 +--- a/drivers/bluetooth/btusb.c
232 ++++ b/drivers/bluetooth/btusb.c
233 +@@ -59,6 +59,7 @@ static struct usb_driver btusb_driver;
234 + #define BTUSB_WIDEBAND_SPEECH 0x400000
235 + #define BTUSB_VALID_LE_STATES 0x800000
236 + #define BTUSB_QCA_WCN6855 0x1000000
237 ++#define BTUSB_INTEL_BROKEN_SHUTDOWN_LED 0x2000000
238 + #define BTUSB_INTEL_BROKEN_INITIAL_NCMD 0x4000000
239 +
240 + static const struct usb_device_id btusb_table[] = {
241 +@@ -295,6 +296,24 @@ static const struct usb_device_id blacklist_table[] = {
242 + { USB_DEVICE(0x0cf3, 0xe600), .driver_info = BTUSB_QCA_WCN6855 |
243 + BTUSB_WIDEBAND_SPEECH |
244 + BTUSB_VALID_LE_STATES },
245 ++ { USB_DEVICE(0x0489, 0xe0cc), .driver_info = BTUSB_QCA_WCN6855 |
246 ++ BTUSB_WIDEBAND_SPEECH |
247 ++ BTUSB_VALID_LE_STATES },
248 ++ { USB_DEVICE(0x0489, 0xe0d6), .driver_info = BTUSB_QCA_WCN6855 |
249 ++ BTUSB_WIDEBAND_SPEECH |
250 ++ BTUSB_VALID_LE_STATES },
251 ++ { USB_DEVICE(0x0489, 0xe0e3), .driver_info = BTUSB_QCA_WCN6855 |
252 ++ BTUSB_WIDEBAND_SPEECH |
253 ++ BTUSB_VALID_LE_STATES },
254 ++ { USB_DEVICE(0x10ab, 0x9309), .driver_info = BTUSB_QCA_WCN6855 |
255 ++ BTUSB_WIDEBAND_SPEECH |
256 ++ BTUSB_VALID_LE_STATES },
257 ++ { USB_DEVICE(0x10ab, 0x9409), .driver_info = BTUSB_QCA_WCN6855 |
258 ++ BTUSB_WIDEBAND_SPEECH |
259 ++ BTUSB_VALID_LE_STATES },
260 ++ { USB_DEVICE(0x0489, 0xe0d0), .driver_info = BTUSB_QCA_WCN6855 |
261 ++ BTUSB_WIDEBAND_SPEECH |
262 ++ BTUSB_VALID_LE_STATES },
263 +
264 + /* Broadcom BCM2035 */
265 + { USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
266 +@@ -365,10 +384,13 @@ static const struct usb_device_id blacklist_table[] = {
267 + { USB_DEVICE(0x8087, 0x0033), .driver_info = BTUSB_INTEL_COMBINED },
268 + { USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
269 + { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL_COMBINED |
270 +- BTUSB_INTEL_BROKEN_INITIAL_NCMD },
271 +- { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL_COMBINED },
272 ++ BTUSB_INTEL_BROKEN_INITIAL_NCMD |
273 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
274 ++ { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL_COMBINED |
275 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
276 + { USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_COMBINED },
277 +- { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED },
278 ++ { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED |
279 ++ BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
280 + { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_COMBINED },
281 +
282 + /* Other Intel Bluetooth devices */
283 +@@ -384,6 +406,14 @@ static const struct usb_device_id blacklist_table[] = {
284 + /* Realtek 8852AE Bluetooth devices */
285 + { USB_DEVICE(0x0bda, 0xc852), .driver_info = BTUSB_REALTEK |
286 + BTUSB_WIDEBAND_SPEECH },
287 ++ { USB_DEVICE(0x0bda, 0x385a), .driver_info = BTUSB_REALTEK |
288 ++ BTUSB_WIDEBAND_SPEECH },
289 ++ { USB_DEVICE(0x0bda, 0x4852), .driver_info = BTUSB_REALTEK |
290 ++ BTUSB_WIDEBAND_SPEECH },
291 ++ { USB_DEVICE(0x04c5, 0x165c), .driver_info = BTUSB_REALTEK |
292 ++ BTUSB_WIDEBAND_SPEECH },
293 ++ { USB_DEVICE(0x04ca, 0x4006), .driver_info = BTUSB_REALTEK |
294 ++ BTUSB_WIDEBAND_SPEECH },
295 +
296 + /* Realtek Bluetooth devices */
297 + { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
298 +@@ -410,10 +440,21 @@ static const struct usb_device_id blacklist_table[] = {
299 + { USB_DEVICE(0x13d3, 0x3563), .driver_info = BTUSB_MEDIATEK |
300 + BTUSB_WIDEBAND_SPEECH |
301 + BTUSB_VALID_LE_STATES },
302 ++ { USB_DEVICE(0x13d3, 0x3564), .driver_info = BTUSB_MEDIATEK |
303 ++ BTUSB_WIDEBAND_SPEECH |
304 ++ BTUSB_VALID_LE_STATES },
305 + { USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK |
306 + BTUSB_WIDEBAND_SPEECH |
307 + BTUSB_VALID_LE_STATES },
308 +
309 ++ /* MediaTek MT7922A Bluetooth devices */
310 ++ { USB_DEVICE(0x0489, 0xe0d8), .driver_info = BTUSB_MEDIATEK |
311 ++ BTUSB_WIDEBAND_SPEECH |
312 ++ BTUSB_VALID_LE_STATES },
313 ++ { USB_DEVICE(0x0489, 0xe0d9), .driver_info = BTUSB_MEDIATEK |
314 ++ BTUSB_WIDEBAND_SPEECH |
315 ++ BTUSB_VALID_LE_STATES },
316 ++
317 + /* Additional Realtek 8723AE Bluetooth devices */
318 + { USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
319 + { USB_DEVICE(0x13d3, 0x3394), .driver_info = BTUSB_REALTEK },
320 +@@ -455,10 +496,6 @@ static const struct usb_device_id blacklist_table[] = {
321 + /* Additional Realtek 8822CE Bluetooth devices */
322 + { USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK |
323 + BTUSB_WIDEBAND_SPEECH },
324 +- /* Bluetooth component of Realtek 8852AE device */
325 +- { USB_DEVICE(0x04ca, 0x4006), .driver_info = BTUSB_REALTEK |
326 +- BTUSB_WIDEBAND_SPEECH },
327 +-
328 + { USB_DEVICE(0x04c5, 0x161f), .driver_info = BTUSB_REALTEK |
329 + BTUSB_WIDEBAND_SPEECH },
330 + { USB_DEVICE(0x0b05, 0x18ef), .driver_info = BTUSB_REALTEK |
331 +@@ -2221,6 +2258,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
332 + skb = bt_skb_alloc(HCI_WMT_MAX_EVENT_SIZE, GFP_ATOMIC);
333 + if (!skb) {
334 + hdev->stat.err_rx++;
335 ++ kfree(urb->setup_packet);
336 + return;
337 + }
338 +
339 +@@ -2241,6 +2279,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
340 + data->evt_skb = skb_clone(skb, GFP_ATOMIC);
341 + if (!data->evt_skb) {
342 + kfree_skb(skb);
343 ++ kfree(urb->setup_packet);
344 + return;
345 + }
346 + }
347 +@@ -2249,6 +2288,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
348 + if (err < 0) {
349 + kfree_skb(data->evt_skb);
350 + data->evt_skb = NULL;
351 ++ kfree(urb->setup_packet);
352 + return;
353 + }
354 +
355 +@@ -2259,6 +2299,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
356 + wake_up_bit(&data->flags,
357 + BTUSB_TX_WAIT_VND_EVT);
358 + }
359 ++ kfree(urb->setup_packet);
360 + return;
361 + } else if (urb->status == -ENOENT) {
362 + /* Avoid suspend failed when usb_kill_urb */
363 +@@ -2279,6 +2320,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb)
364 + usb_anchor_urb(urb, &data->ctrl_anchor);
365 + err = usb_submit_urb(urb, GFP_ATOMIC);
366 + if (err < 0) {
367 ++ kfree(urb->setup_packet);
368 + /* -EPERM: urb is being killed;
369 + * -ENODEV: device got disconnected
370 + */
371 +@@ -2808,6 +2850,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
372 + case 0x7668:
373 + fwname = FIRMWARE_MT7668;
374 + break;
375 ++ case 0x7922:
376 + case 0x7961:
377 + snprintf(fw_bin_name, sizeof(fw_bin_name),
378 + "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin",
379 +@@ -2832,6 +2875,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
380 + }
381 +
382 + hci_set_msft_opcode(hdev, 0xFD30);
383 ++ hci_set_aosp_capable(hdev);
384 + goto done;
385 + default:
386 + bt_dev_err(hdev, "Unsupported hardware variant (%08x)",
387 +@@ -3812,6 +3856,9 @@ static int btusb_probe(struct usb_interface *intf,
388 +
389 + if (id->driver_info & BTUSB_INTEL_BROKEN_INITIAL_NCMD)
390 + btintel_set_flag(hdev, INTEL_BROKEN_INITIAL_NCMD);
391 ++
392 ++ if (id->driver_info & BTUSB_INTEL_BROKEN_SHUTDOWN_LED)
393 ++ btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
394 + }
395 +
396 + if (id->driver_info & BTUSB_MARVELL)
397 +diff --git a/drivers/char/random.c b/drivers/char/random.c
398 +index 605969ed0f965..7470ee24db2f9 100644
399 +--- a/drivers/char/random.c
400 ++++ b/drivers/char/random.c
401 +@@ -461,6 +461,7 @@ static struct crng_state primary_crng = {
402 + * its value (from 0->1->2).
403 + */
404 + static int crng_init = 0;
405 ++static bool crng_need_final_init = false;
406 + #define crng_ready() (likely(crng_init > 1))
407 + static int crng_init_cnt = 0;
408 + static unsigned long crng_global_init_time = 0;
409 +@@ -828,6 +829,36 @@ static void __init crng_initialize_primary(struct crng_state *crng)
410 + crng->init_time = jiffies - CRNG_RESEED_INTERVAL - 1;
411 + }
412 +
413 ++static void crng_finalize_init(struct crng_state *crng)
414 ++{
415 ++ if (crng != &primary_crng || crng_init >= 2)
416 ++ return;
417 ++ if (!system_wq) {
418 ++ /* We can't call numa_crng_init until we have workqueues,
419 ++ * so mark this for processing later. */
420 ++ crng_need_final_init = true;
421 ++ return;
422 ++ }
423 ++
424 ++ invalidate_batched_entropy();
425 ++ numa_crng_init();
426 ++ crng_init = 2;
427 ++ process_random_ready_list();
428 ++ wake_up_interruptible(&crng_init_wait);
429 ++ kill_fasync(&fasync, SIGIO, POLL_IN);
430 ++ pr_notice("crng init done\n");
431 ++ if (unseeded_warning.missed) {
432 ++ pr_notice("%d get_random_xx warning(s) missed due to ratelimiting\n",
433 ++ unseeded_warning.missed);
434 ++ unseeded_warning.missed = 0;
435 ++ }
436 ++ if (urandom_warning.missed) {
437 ++ pr_notice("%d urandom warning(s) missed due to ratelimiting\n",
438 ++ urandom_warning.missed);
439 ++ urandom_warning.missed = 0;
440 ++ }
441 ++}
442 ++
443 + #ifdef CONFIG_NUMA
444 + static void do_numa_crng_init(struct work_struct *work)
445 + {
446 +@@ -843,8 +874,8 @@ static void do_numa_crng_init(struct work_struct *work)
447 + crng_initialize_secondary(crng);
448 + pool[i] = crng;
449 + }
450 +- mb();
451 +- if (cmpxchg(&crng_node_pool, NULL, pool)) {
452 ++ /* pairs with READ_ONCE() in select_crng() */
453 ++ if (cmpxchg_release(&crng_node_pool, NULL, pool) != NULL) {
454 + for_each_node(i)
455 + kfree(pool[i]);
456 + kfree(pool);
457 +@@ -857,8 +888,26 @@ static void numa_crng_init(void)
458 + {
459 + schedule_work(&numa_crng_init_work);
460 + }
461 ++
462 ++static struct crng_state *select_crng(void)
463 ++{
464 ++ struct crng_state **pool;
465 ++ int nid = numa_node_id();
466 ++
467 ++ /* pairs with cmpxchg_release() in do_numa_crng_init() */
468 ++ pool = READ_ONCE(crng_node_pool);
469 ++ if (pool && pool[nid])
470 ++ return pool[nid];
471 ++
472 ++ return &primary_crng;
473 ++}
474 + #else
475 + static void numa_crng_init(void) {}
476 ++
477 ++static struct crng_state *select_crng(void)
478 ++{
479 ++ return &primary_crng;
480 ++}
481 + #endif
482 +
483 + /*
484 +@@ -962,38 +1011,23 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
485 + crng->state[i+4] ^= buf.key[i] ^ rv;
486 + }
487 + memzero_explicit(&buf, sizeof(buf));
488 +- crng->init_time = jiffies;
489 ++ WRITE_ONCE(crng->init_time, jiffies);
490 + spin_unlock_irqrestore(&crng->lock, flags);
491 +- if (crng == &primary_crng && crng_init < 2) {
492 +- invalidate_batched_entropy();
493 +- numa_crng_init();
494 +- crng_init = 2;
495 +- process_random_ready_list();
496 +- wake_up_interruptible(&crng_init_wait);
497 +- kill_fasync(&fasync, SIGIO, POLL_IN);
498 +- pr_notice("crng init done\n");
499 +- if (unseeded_warning.missed) {
500 +- pr_notice("%d get_random_xx warning(s) missed due to ratelimiting\n",
501 +- unseeded_warning.missed);
502 +- unseeded_warning.missed = 0;
503 +- }
504 +- if (urandom_warning.missed) {
505 +- pr_notice("%d urandom warning(s) missed due to ratelimiting\n",
506 +- urandom_warning.missed);
507 +- urandom_warning.missed = 0;
508 +- }
509 +- }
510 ++ crng_finalize_init(crng);
511 + }
512 +
513 + static void _extract_crng(struct crng_state *crng,
514 + __u8 out[CHACHA_BLOCK_SIZE])
515 + {
516 +- unsigned long v, flags;
517 +-
518 +- if (crng_ready() &&
519 +- (time_after(crng_global_init_time, crng->init_time) ||
520 +- time_after(jiffies, crng->init_time + CRNG_RESEED_INTERVAL)))
521 +- crng_reseed(crng, crng == &primary_crng ? &input_pool : NULL);
522 ++ unsigned long v, flags, init_time;
523 ++
524 ++ if (crng_ready()) {
525 ++ init_time = READ_ONCE(crng->init_time);
526 ++ if (time_after(READ_ONCE(crng_global_init_time), init_time) ||
527 ++ time_after(jiffies, init_time + CRNG_RESEED_INTERVAL))
528 ++ crng_reseed(crng, crng == &primary_crng ?
529 ++ &input_pool : NULL);
530 ++ }
531 + spin_lock_irqsave(&crng->lock, flags);
532 + if (arch_get_random_long(&v))
533 + crng->state[14] ^= v;
534 +@@ -1005,15 +1039,7 @@ static void _extract_crng(struct crng_state *crng,
535 +
536 + static void extract_crng(__u8 out[CHACHA_BLOCK_SIZE])
537 + {
538 +- struct crng_state *crng = NULL;
539 +-
540 +-#ifdef CONFIG_NUMA
541 +- if (crng_node_pool)
542 +- crng = crng_node_pool[numa_node_id()];
543 +- if (crng == NULL)
544 +-#endif
545 +- crng = &primary_crng;
546 +- _extract_crng(crng, out);
547 ++ _extract_crng(select_crng(), out);
548 + }
549 +
550 + /*
551 +@@ -1042,15 +1068,7 @@ static void _crng_backtrack_protect(struct crng_state *crng,
552 +
553 + static void crng_backtrack_protect(__u8 tmp[CHACHA_BLOCK_SIZE], int used)
554 + {
555 +- struct crng_state *crng = NULL;
556 +-
557 +-#ifdef CONFIG_NUMA
558 +- if (crng_node_pool)
559 +- crng = crng_node_pool[numa_node_id()];
560 +- if (crng == NULL)
561 +-#endif
562 +- crng = &primary_crng;
563 +- _crng_backtrack_protect(crng, tmp, used);
564 ++ _crng_backtrack_protect(select_crng(), tmp, used);
565 + }
566 +
567 + static ssize_t extract_crng_user(void __user *buf, size_t nbytes)
568 +@@ -1775,6 +1793,8 @@ static void __init init_std_data(struct entropy_store *r)
569 + int __init rand_initialize(void)
570 + {
571 + init_std_data(&input_pool);
572 ++ if (crng_need_final_init)
573 ++ crng_finalize_init(&primary_crng);
574 + crng_initialize_primary(&primary_crng);
575 + crng_global_init_time = jiffies;
576 + if (ratelimit_disable) {
577 +@@ -1949,7 +1969,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
578 + if (crng_init < 2)
579 + return -ENODATA;
580 + crng_reseed(&primary_crng, &input_pool);
581 +- crng_global_init_time = jiffies - 1;
582 ++ WRITE_ONCE(crng_global_init_time, jiffies - 1);
583 + return 0;
584 + default:
585 + return -EINVAL;
586 +@@ -2283,7 +2303,8 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
587 + * We'll be woken up again once below random_write_wakeup_thresh,
588 + * or when the calling thread is about to terminate.
589 + */
590 +- wait_event_interruptible(random_write_wait, kthread_should_stop() ||
591 ++ wait_event_interruptible(random_write_wait,
592 ++ !system_wq || kthread_should_stop() ||
593 + ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
594 + mix_pool_bytes(poolp, buffer, count);
595 + credit_entropy_bits(poolp, entropy);
596 +diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
597 +index a725792d5248b..7f0964645d0cc 100644
598 +--- a/drivers/gpu/drm/i915/intel_pm.c
599 ++++ b/drivers/gpu/drm/i915/intel_pm.c
600 +@@ -3063,9 +3063,9 @@ static void snb_wm_latency_quirk(struct drm_i915_private *dev_priv)
601 + * The BIOS provided WM memory latency values are often
602 + * inadequate for high resolution displays. Adjust them.
603 + */
604 +- changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12) |
605 +- ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12) |
606 +- ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
607 ++ changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12);
608 ++ changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.spr_latency, 12);
609 ++ changed |= ilk_increase_wm_latency(dev_priv, dev_priv->wm.cur_latency, 12);
610 +
611 + if (!changed)
612 + return;
613 +diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
614 +index c4bc67024534a..9a791d8ef200d 100644
615 +--- a/drivers/media/usb/uvc/uvc_driver.c
616 ++++ b/drivers/media/usb/uvc/uvc_driver.c
617 +@@ -2194,7 +2194,6 @@ int uvc_register_video_device(struct uvc_device *dev,
618 + const struct v4l2_file_operations *fops,
619 + const struct v4l2_ioctl_ops *ioctl_ops)
620 + {
621 +- const char *name;
622 + int ret;
623 +
624 + /* Initialize the video buffers queue. */
625 +@@ -2223,20 +2222,16 @@ int uvc_register_video_device(struct uvc_device *dev,
626 + case V4L2_BUF_TYPE_VIDEO_CAPTURE:
627 + default:
628 + vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
629 +- name = "Video Capture";
630 + break;
631 + case V4L2_BUF_TYPE_VIDEO_OUTPUT:
632 + vdev->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
633 +- name = "Video Output";
634 + break;
635 + case V4L2_BUF_TYPE_META_CAPTURE:
636 + vdev->device_caps = V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING;
637 +- name = "Metadata";
638 + break;
639 + }
640 +
641 +- snprintf(vdev->name, sizeof(vdev->name), "%s %u", name,
642 +- stream->header.bTerminalLink);
643 ++ strscpy(vdev->name, dev->name, sizeof(vdev->name));
644 +
645 + /*
646 + * Set the driver data before calling video_register_device, otherwise
647 +diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
648 +index 3f1d976eb67cb..f2ea6540a01e1 100644
649 +--- a/drivers/mfd/intel-lpss-acpi.c
650 ++++ b/drivers/mfd/intel-lpss-acpi.c
651 +@@ -136,6 +136,7 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
652 + {
653 + struct intel_lpss_platform_info *info;
654 + const struct acpi_device_id *id;
655 ++ int ret;
656 +
657 + id = acpi_match_device(intel_lpss_acpi_ids, &pdev->dev);
658 + if (!id)
659 +@@ -149,10 +150,14 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
660 + info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
661 + info->irq = platform_get_irq(pdev, 0);
662 +
663 ++ ret = intel_lpss_probe(&pdev->dev, info);
664 ++ if (ret)
665 ++ return ret;
666 ++
667 + pm_runtime_set_active(&pdev->dev);
668 + pm_runtime_enable(&pdev->dev);
669 +
670 +- return intel_lpss_probe(&pdev->dev, info);
671 ++ return 0;
672 + }
673 +
674 + static int intel_lpss_acpi_remove(struct platform_device *pdev)
675 +diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
676 +index d0f2edfe296c8..c2b26ada104d6 100644
677 +--- a/drivers/mmc/host/sdhci-pci-core.c
678 ++++ b/drivers/mmc/host/sdhci-pci-core.c
679 +@@ -1951,6 +1951,7 @@ static const struct pci_device_id pci_ids[] = {
680 + SDHCI_PCI_DEVICE(INTEL, JSL_SD, intel_byt_sd),
681 + SDHCI_PCI_DEVICE(INTEL, LKF_EMMC, intel_glk_emmc),
682 + SDHCI_PCI_DEVICE(INTEL, LKF_SD, intel_byt_sd),
683 ++ SDHCI_PCI_DEVICE(INTEL, ADL_EMMC, intel_glk_emmc),
684 + SDHCI_PCI_DEVICE(O2, 8120, o2),
685 + SDHCI_PCI_DEVICE(O2, 8220, o2),
686 + SDHCI_PCI_DEVICE(O2, 8221, o2),
687 +diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h
688 +index 8f90c4163bb5c..dcd99d5057ee1 100644
689 +--- a/drivers/mmc/host/sdhci-pci.h
690 ++++ b/drivers/mmc/host/sdhci-pci.h
691 +@@ -59,6 +59,7 @@
692 + #define PCI_DEVICE_ID_INTEL_JSL_SD 0x4df8
693 + #define PCI_DEVICE_ID_INTEL_LKF_EMMC 0x98c4
694 + #define PCI_DEVICE_ID_INTEL_LKF_SD 0x98f8
695 ++#define PCI_DEVICE_ID_INTEL_ADL_EMMC 0x54c4
696 +
697 + #define PCI_DEVICE_ID_SYSKONNECT_8000 0x8000
698 + #define PCI_DEVICE_ID_VIA_95D0 0x95d0
699 +diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
700 +index 5e892bef46b00..8dcdd5162ecf2 100644
701 +--- a/drivers/net/can/usb/gs_usb.c
702 ++++ b/drivers/net/can/usb/gs_usb.c
703 +@@ -321,7 +321,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
704 +
705 + /* device reports out of range channel id */
706 + if (hf->channel >= GS_MAX_INTF)
707 +- goto resubmit_urb;
708 ++ goto device_detach;
709 +
710 + dev = usbcan->canch[hf->channel];
711 +
712 +@@ -406,6 +406,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
713 +
714 + /* USB failure take down all interfaces */
715 + if (rc == -ENODEV) {
716 ++ device_detach:
717 + for (rc = 0; rc < GS_MAX_INTF; rc++) {
718 + if (usbcan->canch[rc])
719 + netif_device_detach(usbcan->canch[rc]->netdev);
720 +@@ -507,6 +508,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
721 +
722 + hf->echo_id = idx;
723 + hf->channel = dev->channel;
724 ++ hf->flags = 0;
725 ++ hf->reserved = 0;
726 +
727 + cf = (struct can_frame *)skb->data;
728 +
729 +diff --git a/drivers/net/veth.c b/drivers/net/veth.c
730 +index 2acdb8ad6c713..ecbc09cbe2590 100644
731 +--- a/drivers/net/veth.c
732 ++++ b/drivers/net/veth.c
733 +@@ -342,7 +342,6 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
734 + */
735 + use_napi = rcu_access_pointer(rq->napi) &&
736 + veth_skb_is_eligible_for_gro(dev, rcv, skb);
737 +- skb_record_rx_queue(skb, rxq);
738 + }
739 +
740 + skb_tx_timestamp(skb);
741 +diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
742 +index 99c0b81e496bf..c22ec921b2e97 100644
743 +--- a/drivers/net/wireless/ath/ath11k/wmi.c
744 ++++ b/drivers/net/wireless/ath/ath11k/wmi.c
745 +@@ -2051,7 +2051,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
746 + void *ptr;
747 + int i, ret, len;
748 + u32 *tmp_ptr;
749 +- u8 extraie_len_with_pad = 0;
750 ++ u16 extraie_len_with_pad = 0;
751 + struct hint_short_ssid *s_ssid = NULL;
752 + struct hint_bssid *hint_bssid = NULL;
753 +
754 +@@ -2070,7 +2070,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
755 + len += sizeof(*bssid) * params->num_bssid;
756 +
757 + len += TLV_HDR_SIZE;
758 +- if (params->extraie.len)
759 ++ if (params->extraie.len && params->extraie.len <= 0xFFFF)
760 + extraie_len_with_pad =
761 + roundup(params->extraie.len, sizeof(u32));
762 + len += extraie_len_with_pad;
763 +@@ -2177,7 +2177,7 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
764 + FIELD_PREP(WMI_TLV_LEN, len);
765 + ptr += TLV_HDR_SIZE;
766 +
767 +- if (params->extraie.len)
768 ++ if (extraie_len_with_pad)
769 + memcpy(ptr, params->extraie.ptr,
770 + params->extraie.len);
771 +
772 +diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
773 +index 13f8cf70b9aee..41a2a026f1568 100644
774 +--- a/drivers/platform/x86/intel/hid.c
775 ++++ b/drivers/platform/x86/intel/hid.c
776 +@@ -106,6 +106,13 @@ static const struct dmi_system_id button_array_table[] = {
777 + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
778 + },
779 + },
780 ++ {
781 ++ .ident = "Microsoft Surface Go 3",
782 ++ .matches = {
783 ++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
784 ++ DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
785 ++ },
786 ++ },
787 + { }
788 + };
789 +
790 +diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
791 +index 1e613d42d8237..7f7d558b76d04 100644
792 +--- a/drivers/staging/greybus/audio_topology.c
793 ++++ b/drivers/staging/greybus/audio_topology.c
794 +@@ -974,6 +974,44 @@ static int gbaudio_widget_event(struct snd_soc_dapm_widget *w,
795 + return ret;
796 + }
797 +
798 ++static const struct snd_soc_dapm_widget gbaudio_widgets[] = {
799 ++ [snd_soc_dapm_spk] = SND_SOC_DAPM_SPK(NULL, gbcodec_event_spk),
800 ++ [snd_soc_dapm_hp] = SND_SOC_DAPM_HP(NULL, gbcodec_event_hp),
801 ++ [snd_soc_dapm_mic] = SND_SOC_DAPM_MIC(NULL, gbcodec_event_int_mic),
802 ++ [snd_soc_dapm_output] = SND_SOC_DAPM_OUTPUT(NULL),
803 ++ [snd_soc_dapm_input] = SND_SOC_DAPM_INPUT(NULL),
804 ++ [snd_soc_dapm_switch] = SND_SOC_DAPM_SWITCH_E(NULL, SND_SOC_NOPM,
805 ++ 0, 0, NULL,
806 ++ gbaudio_widget_event,
807 ++ SND_SOC_DAPM_PRE_PMU |
808 ++ SND_SOC_DAPM_POST_PMD),
809 ++ [snd_soc_dapm_pga] = SND_SOC_DAPM_PGA_E(NULL, SND_SOC_NOPM,
810 ++ 0, 0, NULL, 0,
811 ++ gbaudio_widget_event,
812 ++ SND_SOC_DAPM_PRE_PMU |
813 ++ SND_SOC_DAPM_POST_PMD),
814 ++ [snd_soc_dapm_mixer] = SND_SOC_DAPM_MIXER_E(NULL, SND_SOC_NOPM,
815 ++ 0, 0, NULL, 0,
816 ++ gbaudio_widget_event,
817 ++ SND_SOC_DAPM_PRE_PMU |
818 ++ SND_SOC_DAPM_POST_PMD),
819 ++ [snd_soc_dapm_mux] = SND_SOC_DAPM_MUX_E(NULL, SND_SOC_NOPM,
820 ++ 0, 0, NULL,
821 ++ gbaudio_widget_event,
822 ++ SND_SOC_DAPM_PRE_PMU |
823 ++ SND_SOC_DAPM_POST_PMD),
824 ++ [snd_soc_dapm_aif_in] = SND_SOC_DAPM_AIF_IN_E(NULL, NULL, 0,
825 ++ SND_SOC_NOPM, 0, 0,
826 ++ gbaudio_widget_event,
827 ++ SND_SOC_DAPM_PRE_PMU |
828 ++ SND_SOC_DAPM_POST_PMD),
829 ++ [snd_soc_dapm_aif_out] = SND_SOC_DAPM_AIF_OUT_E(NULL, NULL, 0,
830 ++ SND_SOC_NOPM, 0, 0,
831 ++ gbaudio_widget_event,
832 ++ SND_SOC_DAPM_PRE_PMU |
833 ++ SND_SOC_DAPM_POST_PMD),
834 ++};
835 ++
836 + static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
837 + struct snd_soc_dapm_widget *dw,
838 + struct gb_audio_widget *w, int *w_size)
839 +@@ -1052,77 +1090,37 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
840 +
841 + switch (w->type) {
842 + case snd_soc_dapm_spk:
843 +- *dw = (struct snd_soc_dapm_widget)
844 +- SND_SOC_DAPM_SPK(w->name, gbcodec_event_spk);
845 ++ *dw = gbaudio_widgets[w->type];
846 + module->op_devices |= GBAUDIO_DEVICE_OUT_SPEAKER;
847 + break;
848 + case snd_soc_dapm_hp:
849 +- *dw = (struct snd_soc_dapm_widget)
850 +- SND_SOC_DAPM_HP(w->name, gbcodec_event_hp);
851 ++ *dw = gbaudio_widgets[w->type];
852 + module->op_devices |= (GBAUDIO_DEVICE_OUT_WIRED_HEADSET
853 + | GBAUDIO_DEVICE_OUT_WIRED_HEADPHONE);
854 + module->ip_devices |= GBAUDIO_DEVICE_IN_WIRED_HEADSET;
855 + break;
856 + case snd_soc_dapm_mic:
857 +- *dw = (struct snd_soc_dapm_widget)
858 +- SND_SOC_DAPM_MIC(w->name, gbcodec_event_int_mic);
859 ++ *dw = gbaudio_widgets[w->type];
860 + module->ip_devices |= GBAUDIO_DEVICE_IN_BUILTIN_MIC;
861 + break;
862 + case snd_soc_dapm_output:
863 +- *dw = (struct snd_soc_dapm_widget)SND_SOC_DAPM_OUTPUT(w->name);
864 +- break;
865 + case snd_soc_dapm_input:
866 +- *dw = (struct snd_soc_dapm_widget)SND_SOC_DAPM_INPUT(w->name);
867 +- break;
868 + case snd_soc_dapm_switch:
869 +- *dw = (struct snd_soc_dapm_widget)
870 +- SND_SOC_DAPM_SWITCH_E(w->name, SND_SOC_NOPM, 0, 0,
871 +- widget_kctls,
872 +- gbaudio_widget_event,
873 +- SND_SOC_DAPM_PRE_PMU |
874 +- SND_SOC_DAPM_POST_PMD);
875 +- break;
876 + case snd_soc_dapm_pga:
877 +- *dw = (struct snd_soc_dapm_widget)
878 +- SND_SOC_DAPM_PGA_E(w->name, SND_SOC_NOPM, 0, 0, NULL, 0,
879 +- gbaudio_widget_event,
880 +- SND_SOC_DAPM_PRE_PMU |
881 +- SND_SOC_DAPM_POST_PMD);
882 +- break;
883 + case snd_soc_dapm_mixer:
884 +- *dw = (struct snd_soc_dapm_widget)
885 +- SND_SOC_DAPM_MIXER_E(w->name, SND_SOC_NOPM, 0, 0, NULL,
886 +- 0, gbaudio_widget_event,
887 +- SND_SOC_DAPM_PRE_PMU |
888 +- SND_SOC_DAPM_POST_PMD);
889 +- break;
890 + case snd_soc_dapm_mux:
891 +- *dw = (struct snd_soc_dapm_widget)
892 +- SND_SOC_DAPM_MUX_E(w->name, SND_SOC_NOPM, 0, 0,
893 +- widget_kctls, gbaudio_widget_event,
894 +- SND_SOC_DAPM_PRE_PMU |
895 +- SND_SOC_DAPM_POST_PMD);
896 ++ *dw = gbaudio_widgets[w->type];
897 + break;
898 + case snd_soc_dapm_aif_in:
899 +- *dw = (struct snd_soc_dapm_widget)
900 +- SND_SOC_DAPM_AIF_IN_E(w->name, w->sname, 0,
901 +- SND_SOC_NOPM,
902 +- 0, 0, gbaudio_widget_event,
903 +- SND_SOC_DAPM_PRE_PMU |
904 +- SND_SOC_DAPM_POST_PMD);
905 +- break;
906 + case snd_soc_dapm_aif_out:
907 +- *dw = (struct snd_soc_dapm_widget)
908 +- SND_SOC_DAPM_AIF_OUT_E(w->name, w->sname, 0,
909 +- SND_SOC_NOPM,
910 +- 0, 0, gbaudio_widget_event,
911 +- SND_SOC_DAPM_PRE_PMU |
912 +- SND_SOC_DAPM_POST_PMD);
913 ++ *dw = gbaudio_widgets[w->type];
914 ++ dw->sname = w->sname;
915 + break;
916 + default:
917 + ret = -EINVAL;
918 + goto error;
919 + }
920 ++ dw->name = w->name;
921 +
922 + dev_dbg(module->dev, "%s: widget of type %d created\n", dw->name,
923 + dw->id);
924 +diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
925 +index b33e34cce12e4..f9a8cdd9a1689 100644
926 +--- a/drivers/staging/r8188eu/core/rtw_led.c
927 ++++ b/drivers/staging/r8188eu/core/rtw_led.c
928 +@@ -74,6 +74,7 @@ void DeInitLed871x(struct LED_871x *pLed)
929 + _cancel_workitem_sync(&pLed->BlinkWorkItem);
930 + _cancel_timer_ex(&pLed->BlinkTimer);
931 + ResetLedStatus(pLed);
932 ++ SwLedOff(pLed->padapter, pLed);
933 + }
934 +
935 + /* */
936 +diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
937 +index 8c8524679ba38..0d869b5e309c0 100644
938 +--- a/drivers/staging/wlan-ng/hfa384x_usb.c
939 ++++ b/drivers/staging/wlan-ng/hfa384x_usb.c
940 +@@ -3778,18 +3778,18 @@ static void hfa384x_usb_throttlefn(struct timer_list *t)
941 +
942 + spin_lock_irqsave(&hw->ctlxq.lock, flags);
943 +
944 +- /*
945 +- * We need to check BOTH the RX and the TX throttle controls,
946 +- * so we use the bitwise OR instead of the logical OR.
947 +- */
948 + pr_debug("flags=0x%lx\n", hw->usb_flags);
949 +- if (!hw->wlandev->hwremoved &&
950 +- ((test_and_clear_bit(THROTTLE_RX, &hw->usb_flags) &&
951 +- !test_and_set_bit(WORK_RX_RESUME, &hw->usb_flags)) |
952 +- (test_and_clear_bit(THROTTLE_TX, &hw->usb_flags) &&
953 +- !test_and_set_bit(WORK_TX_RESUME, &hw->usb_flags))
954 +- )) {
955 +- schedule_work(&hw->usb_work);
956 ++ if (!hw->wlandev->hwremoved) {
957 ++ bool rx_throttle = test_and_clear_bit(THROTTLE_RX, &hw->usb_flags) &&
958 ++ !test_and_set_bit(WORK_RX_RESUME, &hw->usb_flags);
959 ++ bool tx_throttle = test_and_clear_bit(THROTTLE_TX, &hw->usb_flags) &&
960 ++ !test_and_set_bit(WORK_TX_RESUME, &hw->usb_flags);
961 ++ /*
962 ++ * We need to check BOTH the RX and the TX throttle controls,
963 ++ * so we use the bitwise OR instead of the logical OR.
964 ++ */
965 ++ if (rx_throttle | tx_throttle)
966 ++ schedule_work(&hw->usb_work);
967 + }
968 +
969 + spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
970 +diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
971 +index 00d35fe1fef0b..16bab98261272 100644
972 +--- a/drivers/usb/core/hcd.c
973 ++++ b/drivers/usb/core/hcd.c
974 +@@ -753,6 +753,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)
975 + {
976 + struct urb *urb;
977 + int length;
978 ++ int status;
979 + unsigned long flags;
980 + char buffer[6]; /* Any root hubs with > 31 ports? */
981 +
982 +@@ -770,11 +771,17 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)
983 + if (urb) {
984 + clear_bit(HCD_FLAG_POLL_PENDING, &hcd->flags);
985 + hcd->status_urb = NULL;
986 ++ if (urb->transfer_buffer_length >= length) {
987 ++ status = 0;
988 ++ } else {
989 ++ status = -EOVERFLOW;
990 ++ length = urb->transfer_buffer_length;
991 ++ }
992 + urb->actual_length = length;
993 + memcpy(urb->transfer_buffer, buffer, length);
994 +
995 + usb_hcd_unlink_urb_from_ep(hcd, urb);
996 +- usb_hcd_giveback_urb(hcd, urb, 0);
997 ++ usb_hcd_giveback_urb(hcd, urb, status);
998 + } else {
999 + length = 0;
1000 + set_bit(HCD_FLAG_POLL_PENDING, &hcd->flags);
1001 +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
1002 +index 00070a8a65079..3bc4a86c3d0a5 100644
1003 +--- a/drivers/usb/core/hub.c
1004 ++++ b/drivers/usb/core/hub.c
1005 +@@ -1225,7 +1225,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
1006 + */
1007 + if (portchange || (hub_is_superspeed(hub->hdev) &&
1008 + port_resumed))
1009 +- set_bit(port1, hub->change_bits);
1010 ++ set_bit(port1, hub->event_bits);
1011 +
1012 + } else if (udev->persist_enabled) {
1013 + #ifdef CONFIG_PM
1014 +diff --git a/fs/file.c b/fs/file.c
1015 +index ad4a8bf3cf109..97d212a9b8144 100644
1016 +--- a/fs/file.c
1017 ++++ b/fs/file.c
1018 +@@ -841,28 +841,68 @@ void do_close_on_exec(struct files_struct *files)
1019 + spin_unlock(&files->file_lock);
1020 + }
1021 +
1022 +-static struct file *__fget_files(struct files_struct *files, unsigned int fd,
1023 +- fmode_t mask, unsigned int refs)
1024 ++static inline struct file *__fget_files_rcu(struct files_struct *files,
1025 ++ unsigned int fd, fmode_t mask, unsigned int refs)
1026 + {
1027 +- struct file *file;
1028 ++ for (;;) {
1029 ++ struct file *file;
1030 ++ struct fdtable *fdt = rcu_dereference_raw(files->fdt);
1031 ++ struct file __rcu **fdentry;
1032 +
1033 +- rcu_read_lock();
1034 +-loop:
1035 +- file = files_lookup_fd_rcu(files, fd);
1036 +- if (file) {
1037 +- /* File object ref couldn't be taken.
1038 +- * dup2() atomicity guarantee is the reason
1039 +- * we loop to catch the new file (or NULL pointer)
1040 ++ if (unlikely(fd >= fdt->max_fds))
1041 ++ return NULL;
1042 ++
1043 ++ fdentry = fdt->fd + array_index_nospec(fd, fdt->max_fds);
1044 ++ file = rcu_dereference_raw(*fdentry);
1045 ++ if (unlikely(!file))
1046 ++ return NULL;
1047 ++
1048 ++ if (unlikely(file->f_mode & mask))
1049 ++ return NULL;
1050 ++
1051 ++ /*
1052 ++ * Ok, we have a file pointer. However, because we do
1053 ++ * this all locklessly under RCU, we may be racing with
1054 ++ * that file being closed.
1055 ++ *
1056 ++ * Such a race can take two forms:
1057 ++ *
1058 ++ * (a) the file ref already went down to zero,
1059 ++ * and get_file_rcu_many() fails. Just try
1060 ++ * again:
1061 + */
1062 +- if (file->f_mode & mask)
1063 +- file = NULL;
1064 +- else if (!get_file_rcu_many(file, refs))
1065 +- goto loop;
1066 +- else if (files_lookup_fd_raw(files, fd) != file) {
1067 ++ if (unlikely(!get_file_rcu_many(file, refs)))
1068 ++ continue;
1069 ++
1070 ++ /*
1071 ++ * (b) the file table entry has changed under us.
1072 ++ * Note that we don't need to re-check the 'fdt->fd'
1073 ++ * pointer having changed, because it always goes
1074 ++ * hand-in-hand with 'fdt'.
1075 ++ *
1076 ++ * If so, we need to put our refs and try again.
1077 ++ */
1078 ++ if (unlikely(rcu_dereference_raw(files->fdt) != fdt) ||
1079 ++ unlikely(rcu_dereference_raw(*fdentry) != file)) {
1080 + fput_many(file, refs);
1081 +- goto loop;
1082 ++ continue;
1083 + }
1084 ++
1085 ++ /*
1086 ++ * Ok, we have a ref to the file, and checked that it
1087 ++ * still exists.
1088 ++ */
1089 ++ return file;
1090 + }
1091 ++}
1092 ++
1093 ++static struct file *__fget_files(struct files_struct *files, unsigned int fd,
1094 ++ fmode_t mask, unsigned int refs)
1095 ++{
1096 ++ struct file *file;
1097 ++
1098 ++ rcu_read_lock();
1099 ++ file = __fget_files_rcu(files, fd, mask, refs);
1100 + rcu_read_unlock();
1101 +
1102 + return file;
1103 +diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
1104 +index b80415011dcd5..9ce46cb8564d6 100644
1105 +--- a/include/net/bluetooth/hci.h
1106 ++++ b/include/net/bluetooth/hci.h
1107 +@@ -246,6 +246,15 @@ enum {
1108 + * HCI after resume.
1109 + */
1110 + HCI_QUIRK_NO_SUSPEND_NOTIFIER,
1111 ++
1112 ++ /*
1113 ++ * When this quirk is set, LE tx power is not queried on startup
1114 ++ * and the min/max tx power values default to HCI_TX_POWER_INVALID.
1115 ++ *
1116 ++ * This quirk can be set before hci_register_dev is called or
1117 ++ * during the hdev->setup vendor callback.
1118 ++ */
1119 ++ HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
1120 + };
1121 +
1122 + /* HCI device flags */
1123 +diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
1124 +index 93c3a332e8536..b84e63d62b8af 100644
1125 +--- a/kernel/bpf/verifier.c
1126 ++++ b/kernel/bpf/verifier.c
1127 +@@ -7039,16 +7039,16 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
1128 + fallthrough;
1129 + case PTR_TO_PACKET_END:
1130 + case PTR_TO_SOCKET:
1131 +- case PTR_TO_SOCKET_OR_NULL:
1132 + case PTR_TO_SOCK_COMMON:
1133 +- case PTR_TO_SOCK_COMMON_OR_NULL:
1134 + case PTR_TO_TCP_SOCK:
1135 +- case PTR_TO_TCP_SOCK_OR_NULL:
1136 + case PTR_TO_XDP_SOCK:
1137 ++reject:
1138 + verbose(env, "R%d pointer arithmetic on %s prohibited\n",
1139 + dst, reg_type_str[ptr_reg->type]);
1140 + return -EACCES;
1141 + default:
1142 ++ if (reg_type_may_be_null(ptr_reg->type))
1143 ++ goto reject;
1144 + break;
1145 + }
1146 +
1147 +diff --git a/kernel/workqueue.c b/kernel/workqueue.c
1148 +index 76988f39ed5ac..3f4d276685768 100644
1149 +--- a/kernel/workqueue.c
1150 ++++ b/kernel/workqueue.c
1151 +@@ -867,8 +867,17 @@ void wq_worker_running(struct task_struct *task)
1152 +
1153 + if (!worker->sleeping)
1154 + return;
1155 ++
1156 ++ /*
1157 ++ * If preempted by unbind_workers() between the WORKER_NOT_RUNNING check
1158 ++ * and the nr_running increment below, we may ruin the nr_running reset
1159 ++ * and leave with an unexpected pool->nr_running == 1 on the newly unbound
1160 ++ * pool. Protect against such race.
1161 ++ */
1162 ++ preempt_disable();
1163 + if (!(worker->flags & WORKER_NOT_RUNNING))
1164 + atomic_inc(&worker->pool->nr_running);
1165 ++ preempt_enable();
1166 + worker->sleeping = 0;
1167 + }
1168 +
1169 +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
1170 +index 8a47a3017d61d..325db9c4c6109 100644
1171 +--- a/net/bluetooth/hci_core.c
1172 ++++ b/net/bluetooth/hci_core.c
1173 +@@ -742,7 +742,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
1174 + hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
1175 + }
1176 +
1177 +- if (hdev->commands[38] & 0x80) {
1178 ++ if ((hdev->commands[38] & 0x80) &&
1179 ++ !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {
1180 + /* Read LE Min/Max Tx Power*/
1181 + hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER,
1182 + 0, NULL);
1183 +diff --git a/net/can/isotp.c b/net/can/isotp.c
1184 +index df6968b28bf41..02cbcb2ecf0db 100644
1185 +--- a/net/can/isotp.c
1186 ++++ b/net/can/isotp.c
1187 +@@ -119,8 +119,8 @@ enum {
1188 + };
1189 +
1190 + struct tpcon {
1191 +- int idx;
1192 +- int len;
1193 ++ unsigned int idx;
1194 ++ unsigned int len;
1195 + u32 state;
1196 + u8 bs;
1197 + u8 sn;