Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.10 commit in: /
Date: Fri, 18 Jun 2021 11:37:18
Message-Id: 1624016221.5f098a1db04014be1f66642a7062bf5eb66e1567.mpagano@gentoo
1 commit: 5f098a1db04014be1f66642a7062bf5eb66e1567
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 18 11:37:01 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 18 11:37:01 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5f098a1d
7
8 Linux patch 5.10.45
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1044_linux-5.10.45.patch | 1077 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1081 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index e96b155..5ac74f5 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -219,6 +219,10 @@ Patch: 1043_linux-5.10.44.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.10.44
23
24 +Patch: 1044_linux-5.10.45.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.10.45
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/1044_linux-5.10.45.patch b/1044_linux-5.10.45.patch
33 new file mode 100644
34 index 0000000..d41c3c1
35 --- /dev/null
36 +++ b/1044_linux-5.10.45.patch
37 @@ -0,0 +1,1077 @@
38 +diff --git a/Makefile b/Makefile
39 +index ae33e048eb8db..808b68483002f 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 10
46 +-SUBLEVEL = 44
47 ++SUBLEVEL = 45
48 + EXTRAVERSION =
49 + NAME = Dare mighty things
50 +
51 +diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
52 +index 2c1e2b32b9b36..a745d64d46995 100644
53 +--- a/arch/arm/mach-omap1/pm.c
54 ++++ b/arch/arm/mach-omap1/pm.c
55 +@@ -655,9 +655,13 @@ static int __init omap_pm_init(void)
56 + irq = INT_7XX_WAKE_UP_REQ;
57 + else if (cpu_is_omap16xx())
58 + irq = INT_1610_WAKE_UP_REQ;
59 +- if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup",
60 +- NULL))
61 +- pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
62 ++ else
63 ++ irq = -1;
64 ++
65 ++ if (irq >= 0) {
66 ++ if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", NULL))
67 ++ pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
68 ++ }
69 +
70 + /* Program new power ramp-up time
71 + * (0 for most boards since we don't lower voltage when in deep sleep)
72 +diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
73 +index 418a61ecb8275..5e86145db0e2a 100644
74 +--- a/arch/arm/mach-omap2/board-n8x0.c
75 ++++ b/arch/arm/mach-omap2/board-n8x0.c
76 +@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
77 +
78 + static void n8x0_mmc_callback(void *data, u8 card_mask)
79 + {
80 ++#ifdef CONFIG_MMC_OMAP
81 + int bit, *openp, index;
82 +
83 + if (board_is_n800()) {
84 +@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
85 + else
86 + *openp = 0;
87 +
88 +-#ifdef CONFIG_MMC_OMAP
89 + omap_mmc_notify_cover_event(mmc_device, index, *openp);
90 + #else
91 + pr_warn("MMC: notify cover event not available\n");
92 +diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
93 +index 0289a97325d12..e241e0e85ac81 100644
94 +--- a/arch/riscv/Makefile
95 ++++ b/arch/riscv/Makefile
96 +@@ -36,6 +36,15 @@ else
97 + KBUILD_LDFLAGS += -melf32lriscv
98 + endif
99 +
100 ++ifeq ($(CONFIG_LD_IS_LLD),y)
101 ++ KBUILD_CFLAGS += -mno-relax
102 ++ KBUILD_AFLAGS += -mno-relax
103 ++ifneq ($(LLVM_IAS),1)
104 ++ KBUILD_CFLAGS += -Wa,-mno-relax
105 ++ KBUILD_AFLAGS += -Wa,-mno-relax
106 ++endif
107 ++endif
108 ++
109 + # ISA string setting
110 + riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
111 + riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
112 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
113 +index 175cb1c0d5698..b1f0b13cc8bc6 100644
114 +--- a/drivers/bluetooth/btusb.c
115 ++++ b/drivers/bluetooth/btusb.c
116 +@@ -385,6 +385,8 @@ static const struct usb_device_id blacklist_table[] = {
117 + /* Realtek 8822CE Bluetooth devices */
118 + { USB_DEVICE(0x0bda, 0xb00c), .driver_info = BTUSB_REALTEK |
119 + BTUSB_WIDEBAND_SPEECH },
120 ++ { USB_DEVICE(0x0bda, 0xc822), .driver_info = BTUSB_REALTEK |
121 ++ BTUSB_WIDEBAND_SPEECH },
122 +
123 + /* Realtek Bluetooth devices */
124 + { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
125 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
126 +index 8f4a8f8d81463..39b6c6bfab453 100644
127 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
128 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
129 +@@ -101,7 +101,8 @@ static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
130 + int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
131 + {
132 + unsigned char buff[34];
133 +- int addrptr = 0, size = 0;
134 ++ int addrptr, size;
135 ++ int len;
136 +
137 + if (!is_fru_eeprom_supported(adev))
138 + return 0;
139 +@@ -109,7 +110,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
140 + /* If algo exists, it means that the i2c_adapter's initialized */
141 + if (!adev->pm.smu_i2c.algo) {
142 + DRM_WARN("Cannot access FRU, EEPROM accessor not initialized");
143 +- return 0;
144 ++ return -ENODEV;
145 + }
146 +
147 + /* There's a lot of repetition here. This is due to the FRU having
148 +@@ -128,7 +129,7 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
149 + size = amdgpu_fru_read_eeprom(adev, addrptr, buff);
150 + if (size < 1) {
151 + DRM_ERROR("Failed to read FRU Manufacturer, ret:%d", size);
152 +- return size;
153 ++ return -EINVAL;
154 + }
155 +
156 + /* Increment the addrptr by the size of the field, and 1 due to the
157 +@@ -138,43 +139,45 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
158 + size = amdgpu_fru_read_eeprom(adev, addrptr, buff);
159 + if (size < 1) {
160 + DRM_ERROR("Failed to read FRU product name, ret:%d", size);
161 +- return size;
162 ++ return -EINVAL;
163 + }
164 +
165 ++ len = size;
166 + /* Product name should only be 32 characters. Any more,
167 + * and something could be wrong. Cap it at 32 to be safe
168 + */
169 +- if (size > 32) {
170 ++ if (len >= sizeof(adev->product_name)) {
171 + DRM_WARN("FRU Product Number is larger than 32 characters. This is likely a mistake");
172 +- size = 32;
173 ++ len = sizeof(adev->product_name) - 1;
174 + }
175 + /* Start at 2 due to buff using fields 0 and 1 for the address */
176 +- memcpy(adev->product_name, &buff[2], size);
177 +- adev->product_name[size] = '\0';
178 ++ memcpy(adev->product_name, &buff[2], len);
179 ++ adev->product_name[len] = '\0';
180 +
181 + addrptr += size + 1;
182 + size = amdgpu_fru_read_eeprom(adev, addrptr, buff);
183 + if (size < 1) {
184 + DRM_ERROR("Failed to read FRU product number, ret:%d", size);
185 +- return size;
186 ++ return -EINVAL;
187 + }
188 +
189 ++ len = size;
190 + /* Product number should only be 16 characters. Any more,
191 + * and something could be wrong. Cap it at 16 to be safe
192 + */
193 +- if (size > 16) {
194 ++ if (len >= sizeof(adev->product_number)) {
195 + DRM_WARN("FRU Product Number is larger than 16 characters. This is likely a mistake");
196 +- size = 16;
197 ++ len = sizeof(adev->product_number) - 1;
198 + }
199 +- memcpy(adev->product_number, &buff[2], size);
200 +- adev->product_number[size] = '\0';
201 ++ memcpy(adev->product_number, &buff[2], len);
202 ++ adev->product_number[len] = '\0';
203 +
204 + addrptr += size + 1;
205 + size = amdgpu_fru_read_eeprom(adev, addrptr, buff);
206 +
207 + if (size < 1) {
208 + DRM_ERROR("Failed to read FRU product version, ret:%d", size);
209 +- return size;
210 ++ return -EINVAL;
211 + }
212 +
213 + addrptr += size + 1;
214 +@@ -182,18 +185,19 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
215 +
216 + if (size < 1) {
217 + DRM_ERROR("Failed to read FRU serial number, ret:%d", size);
218 +- return size;
219 ++ return -EINVAL;
220 + }
221 +
222 ++ len = size;
223 + /* Serial number should only be 16 characters. Any more,
224 + * and something could be wrong. Cap it at 16 to be safe
225 + */
226 +- if (size > 16) {
227 ++ if (len >= sizeof(adev->serial)) {
228 + DRM_WARN("FRU Serial Number is larger than 16 characters. This is likely a mistake");
229 +- size = 16;
230 ++ len = sizeof(adev->serial) - 1;
231 + }
232 +- memcpy(adev->serial, &buff[2], size);
233 +- adev->serial[size] = '\0';
234 ++ memcpy(adev->serial, &buff[2], len);
235 ++ adev->serial[len] = '\0';
236 +
237 + return 0;
238 + }
239 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
240 +index 919d2fb7427b1..60b7563f4c05d 100644
241 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
242 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
243 +@@ -73,6 +73,7 @@ struct psp_ring
244 + uint64_t ring_mem_mc_addr;
245 + void *ring_mem_handle;
246 + uint32_t ring_size;
247 ++ uint32_t ring_wptr;
248 + };
249 +
250 + /* More registers may will be supported */
251 +diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
252 +index 6c5d9612abcb6..cb764b5545527 100644
253 +--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
254 ++++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
255 +@@ -732,7 +732,7 @@ static uint32_t psp_v11_0_ring_get_wptr(struct psp_context *psp)
256 + struct amdgpu_device *adev = psp->adev;
257 +
258 + if (amdgpu_sriov_vf(adev))
259 +- data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102);
260 ++ data = psp->km_ring.ring_wptr;
261 + else
262 + data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67);
263 +
264 +@@ -746,6 +746,7 @@ static void psp_v11_0_ring_set_wptr(struct psp_context *psp, uint32_t value)
265 + if (amdgpu_sriov_vf(adev)) {
266 + WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102, value);
267 + WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_101, GFX_CTRL_CMD_ID_CONSUME_CMD);
268 ++ psp->km_ring.ring_wptr = value;
269 + } else
270 + WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67, value);
271 + }
272 +diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
273 +index f2e725f72d2f1..908664a5774bb 100644
274 +--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
275 ++++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
276 +@@ -379,7 +379,7 @@ static uint32_t psp_v3_1_ring_get_wptr(struct psp_context *psp)
277 + struct amdgpu_device *adev = psp->adev;
278 +
279 + if (amdgpu_sriov_vf(adev))
280 +- data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_102);
281 ++ data = psp->km_ring.ring_wptr;
282 + else
283 + data = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67);
284 + return data;
285 +@@ -394,6 +394,7 @@ static void psp_v3_1_ring_set_wptr(struct psp_context *psp, uint32_t value)
286 + /* send interrupt to PSP for SRIOV ring write pointer update */
287 + WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_101,
288 + GFX_CTRL_CMD_ID_CONSUME_CMD);
289 ++ psp->km_ring.ring_wptr = value;
290 + } else
291 + WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_67, value);
292 + }
293 +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
294 +index fbbb1bde6b063..df26c07cb9120 100644
295 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
296 ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
297 +@@ -870,7 +870,8 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
298 + abm->dmcu_is_running = dmcu->funcs->is_dmcu_initialized(dmcu);
299 + }
300 +
301 +- adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv);
302 ++ if (!adev->dm.dc->ctx->dmub_srv)
303 ++ adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv);
304 + if (!adev->dm.dc->ctx->dmub_srv) {
305 + DRM_ERROR("Couldn't allocate DC DMUB server!\n");
306 + return -ENOMEM;
307 +@@ -1755,7 +1756,6 @@ static int dm_suspend(void *handle)
308 +
309 + amdgpu_dm_irq_suspend(adev);
310 +
311 +-
312 + dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3);
313 +
314 + return 0;
315 +diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
316 +index 33488b3c5c3ce..1812ec7ee11bb 100644
317 +--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
318 ++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
319 +@@ -3232,7 +3232,7 @@ static noinline bool dcn20_validate_bandwidth_fp(struct dc *dc,
320 + voltage_supported = dcn20_validate_bandwidth_internal(dc, context, false);
321 + dummy_pstate_supported = context->bw_ctx.bw.dcn.clk.p_state_change_support;
322 +
323 +- if (voltage_supported && dummy_pstate_supported) {
324 ++ if (voltage_supported && (dummy_pstate_supported || !(context->stream_count))) {
325 + context->bw_ctx.bw.dcn.clk.p_state_change_support = false;
326 + goto restore_dml_state;
327 + }
328 +diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
329 +index 7b88261f57bb6..32c83f2e386ca 100644
330 +--- a/drivers/gpu/drm/tegra/sor.c
331 ++++ b/drivers/gpu/drm/tegra/sor.c
332 +@@ -3125,21 +3125,21 @@ static int tegra_sor_init(struct host1x_client *client)
333 + if (err < 0) {
334 + dev_err(sor->dev, "failed to acquire SOR reset: %d\n",
335 + err);
336 +- return err;
337 ++ goto rpm_put;
338 + }
339 +
340 + err = reset_control_assert(sor->rst);
341 + if (err < 0) {
342 + dev_err(sor->dev, "failed to assert SOR reset: %d\n",
343 + err);
344 +- return err;
345 ++ goto rpm_put;
346 + }
347 + }
348 +
349 + err = clk_prepare_enable(sor->clk);
350 + if (err < 0) {
351 + dev_err(sor->dev, "failed to enable clock: %d\n", err);
352 +- return err;
353 ++ goto rpm_put;
354 + }
355 +
356 + usleep_range(1000, 3000);
357 +@@ -3150,7 +3150,7 @@ static int tegra_sor_init(struct host1x_client *client)
358 + dev_err(sor->dev, "failed to deassert SOR reset: %d\n",
359 + err);
360 + clk_disable_unprepare(sor->clk);
361 +- return err;
362 ++ goto rpm_put;
363 + }
364 +
365 + reset_control_release(sor->rst);
366 +@@ -3171,6 +3171,12 @@ static int tegra_sor_init(struct host1x_client *client)
367 + }
368 +
369 + return 0;
370 ++
371 ++rpm_put:
372 ++ if (sor->rst)
373 ++ pm_runtime_put(sor->dev);
374 ++
375 ++ return err;
376 + }
377 +
378 + static int tegra_sor_exit(struct host1x_client *client)
379 +@@ -3916,17 +3922,10 @@ static int tegra_sor_probe(struct platform_device *pdev)
380 + platform_set_drvdata(pdev, sor);
381 + pm_runtime_enable(&pdev->dev);
382 +
383 +- INIT_LIST_HEAD(&sor->client.list);
384 ++ host1x_client_init(&sor->client);
385 + sor->client.ops = &sor_client_ops;
386 + sor->client.dev = &pdev->dev;
387 +
388 +- err = host1x_client_register(&sor->client);
389 +- if (err < 0) {
390 +- dev_err(&pdev->dev, "failed to register host1x client: %d\n",
391 +- err);
392 +- goto rpm_disable;
393 +- }
394 +-
395 + /*
396 + * On Tegra210 and earlier, provide our own implementation for the
397 + * pad output clock.
398 +@@ -3938,13 +3937,13 @@ static int tegra_sor_probe(struct platform_device *pdev)
399 + sor->index);
400 + if (!name) {
401 + err = -ENOMEM;
402 +- goto unregister;
403 ++ goto uninit;
404 + }
405 +
406 + err = host1x_client_resume(&sor->client);
407 + if (err < 0) {
408 + dev_err(sor->dev, "failed to resume: %d\n", err);
409 +- goto unregister;
410 ++ goto uninit;
411 + }
412 +
413 + sor->clk_pad = tegra_clk_sor_pad_register(sor, name);
414 +@@ -3955,14 +3954,20 @@ static int tegra_sor_probe(struct platform_device *pdev)
415 + err = PTR_ERR(sor->clk_pad);
416 + dev_err(sor->dev, "failed to register SOR pad clock: %d\n",
417 + err);
418 +- goto unregister;
419 ++ goto uninit;
420 ++ }
421 ++
422 ++ err = __host1x_client_register(&sor->client);
423 ++ if (err < 0) {
424 ++ dev_err(&pdev->dev, "failed to register host1x client: %d\n",
425 ++ err);
426 ++ goto uninit;
427 + }
428 +
429 + return 0;
430 +
431 +-unregister:
432 +- host1x_client_unregister(&sor->client);
433 +-rpm_disable:
434 ++uninit:
435 ++ host1x_client_exit(&sor->client);
436 + pm_runtime_disable(&pdev->dev);
437 + remove:
438 + tegra_output_remove(&sor->output);
439 +diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
440 +index 9e2cb6968819e..6e3b49d0de66d 100644
441 +--- a/drivers/gpu/host1x/bus.c
442 ++++ b/drivers/gpu/host1x/bus.c
443 +@@ -703,6 +703,29 @@ void host1x_driver_unregister(struct host1x_driver *driver)
444 + }
445 + EXPORT_SYMBOL(host1x_driver_unregister);
446 +
447 ++/**
448 ++ * __host1x_client_init() - initialize a host1x client
449 ++ * @client: host1x client
450 ++ * @key: lock class key for the client-specific mutex
451 ++ */
452 ++void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key)
453 ++{
454 ++ INIT_LIST_HEAD(&client->list);
455 ++ __mutex_init(&client->lock, "host1x client lock", key);
456 ++ client->usecount = 0;
457 ++}
458 ++EXPORT_SYMBOL(__host1x_client_init);
459 ++
460 ++/**
461 ++ * host1x_client_exit() - uninitialize a host1x client
462 ++ * @client: host1x client
463 ++ */
464 ++void host1x_client_exit(struct host1x_client *client)
465 ++{
466 ++ mutex_destroy(&client->lock);
467 ++}
468 ++EXPORT_SYMBOL(host1x_client_exit);
469 ++
470 + /**
471 + * __host1x_client_register() - register a host1x client
472 + * @client: host1x client
473 +@@ -715,16 +738,11 @@ EXPORT_SYMBOL(host1x_driver_unregister);
474 + * device and call host1x_device_init(), which will in turn call each client's
475 + * &host1x_client_ops.init implementation.
476 + */
477 +-int __host1x_client_register(struct host1x_client *client,
478 +- struct lock_class_key *key)
479 ++int __host1x_client_register(struct host1x_client *client)
480 + {
481 + struct host1x *host1x;
482 + int err;
483 +
484 +- INIT_LIST_HEAD(&client->list);
485 +- __mutex_init(&client->lock, "host1x client lock", key);
486 +- client->usecount = 0;
487 +-
488 + mutex_lock(&devices_lock);
489 +
490 + list_for_each_entry(host1x, &devices, list) {
491 +diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
492 +index 9b56226ce0d1c..54bc563a8dff1 100644
493 +--- a/drivers/hid/Kconfig
494 ++++ b/drivers/hid/Kconfig
495 +@@ -93,11 +93,11 @@ menu "Special HID drivers"
496 + depends on HID
497 +
498 + config HID_A4TECH
499 +- tristate "A4 tech mice"
500 ++ tristate "A4TECH mice"
501 + depends on HID
502 + default !EXPERT
503 + help
504 +- Support for A4 tech X5 and WOP-35 / Trust 450L mice.
505 ++ Support for some A4TECH mice with two scroll wheels.
506 +
507 + config HID_ACCUTOUCH
508 + tristate "Accutouch touch device"
509 +diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c
510 +index 3a8c4a5971f70..2cbc32dda7f74 100644
511 +--- a/drivers/hid/hid-a4tech.c
512 ++++ b/drivers/hid/hid-a4tech.c
513 +@@ -147,6 +147,8 @@ static const struct hid_device_id a4_devices[] = {
514 + .driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
515 + { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649),
516 + .driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
517 ++ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95),
518 ++ .driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
519 + { }
520 + };
521 + MODULE_DEVICE_TABLE(hid, a4_devices);
522 +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
523 +index 097cb1ee31268..0f69f35f2957e 100644
524 +--- a/drivers/hid/hid-core.c
525 ++++ b/drivers/hid/hid-core.c
526 +@@ -2005,6 +2005,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
527 + case BUS_I2C:
528 + bus = "I2C";
529 + break;
530 ++ case BUS_VIRTUAL:
531 ++ bus = "VIRTUAL";
532 ++ break;
533 + default:
534 + bus = "<UNKNOWN>";
535 + }
536 +diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
537 +index d7eaf91003706..982737827b871 100644
538 +--- a/drivers/hid/hid-debug.c
539 ++++ b/drivers/hid/hid-debug.c
540 +@@ -929,6 +929,7 @@ static const char *keys[KEY_MAX + 1] = {
541 + [KEY_APPSELECT] = "AppSelect",
542 + [KEY_SCREENSAVER] = "ScreenSaver",
543 + [KEY_VOICECOMMAND] = "VoiceCommand",
544 ++ [KEY_EMOJI_PICKER] = "EmojiPicker",
545 + [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
546 + [KEY_BRIGHTNESS_MAX] = "BrightnessMax",
547 + [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
548 +diff --git a/drivers/hid/hid-gt683r.c b/drivers/hid/hid-gt683r.c
549 +index 898871c8c768e..29ccb0accfba8 100644
550 +--- a/drivers/hid/hid-gt683r.c
551 ++++ b/drivers/hid/hid-gt683r.c
552 +@@ -54,6 +54,7 @@ static const struct hid_device_id gt683r_led_id[] = {
553 + { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },
554 + { }
555 + };
556 ++MODULE_DEVICE_TABLE(hid, gt683r_led_id);
557 +
558 + static void gt683r_brightness_set(struct led_classdev *led_cdev,
559 + enum led_brightness brightness)
560 +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
561 +index e220a05a05b48..136b58a91c04c 100644
562 +--- a/drivers/hid/hid-ids.h
563 ++++ b/drivers/hid/hid-ids.h
564 +@@ -26,6 +26,7 @@
565 + #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
566 + #define USB_DEVICE_ID_A4TECH_X5_005D 0x000a
567 + #define USB_DEVICE_ID_A4TECH_RP_649 0x001a
568 ++#define USB_DEVICE_ID_A4TECH_NB_95 0x022b
569 +
570 + #define USB_VENDOR_ID_AASHIMA 0x06d6
571 + #define USB_DEVICE_ID_AASHIMA_GAMEPAD 0x0025
572 +@@ -741,6 +742,7 @@
573 + #define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085
574 + #define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3
575 + #define USB_DEVICE_ID_LENOVO_X1_TAB3 0x60b5
576 ++#define USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E 0x600e
577 + #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D 0x608d
578 + #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019 0x6019
579 + #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E 0x602e
580 +@@ -1034,6 +1036,7 @@
581 + #define USB_DEVICE_ID_SAITEK_X52 0x075c
582 + #define USB_DEVICE_ID_SAITEK_X52_2 0x0255
583 + #define USB_DEVICE_ID_SAITEK_X52_PRO 0x0762
584 ++#define USB_DEVICE_ID_SAITEK_X65 0x0b6a
585 +
586 + #define USB_VENDOR_ID_SAMSUNG 0x0419
587 + #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001
588 +diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
589 +index 32024905fd70f..d1ab2dccf6fd7 100644
590 +--- a/drivers/hid/hid-input.c
591 ++++ b/drivers/hid/hid-input.c
592 +@@ -957,6 +957,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
593 +
594 + case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break;
595 + case 0x0cf: map_key_clear(KEY_VOICECOMMAND); break;
596 ++
597 ++ case 0x0d9: map_key_clear(KEY_EMOJI_PICKER); break;
598 ++
599 + case 0x0e0: map_abs_clear(ABS_VOLUME); break;
600 + case 0x0e2: map_key_clear(KEY_MUTE); break;
601 + case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
602 +diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
603 +index 8580ace596c25..e5a3704b9fe8f 100644
604 +--- a/drivers/hid/hid-multitouch.c
605 ++++ b/drivers/hid/hid-multitouch.c
606 +@@ -1580,13 +1580,13 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
607 + /* we do not set suffix = "Touchscreen" */
608 + hi->input->name = hdev->name;
609 + break;
610 +- case HID_DG_STYLUS:
611 +- /* force BTN_STYLUS to allow tablet matching in udev */
612 +- __set_bit(BTN_STYLUS, hi->input->keybit);
613 +- break;
614 + case HID_VD_ASUS_CUSTOM_MEDIA_KEYS:
615 + suffix = "Custom Media Keys";
616 + break;
617 ++ case HID_DG_STYLUS:
618 ++ /* force BTN_STYLUS to allow tablet matching in udev */
619 ++ __set_bit(BTN_STYLUS, hi->input->keybit);
620 ++ fallthrough;
621 + case HID_DG_PEN:
622 + suffix = "Stylus";
623 + break;
624 +diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
625 +index 2e38340e19dfb..be53c723c729d 100644
626 +--- a/drivers/hid/hid-quirks.c
627 ++++ b/drivers/hid/hid-quirks.c
628 +@@ -110,6 +110,7 @@ static const struct hid_device_id hid_quirks[] = {
629 + { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
630 + { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
631 + { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
632 ++ { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E), HID_QUIRK_ALWAYS_POLL },
633 + { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D), HID_QUIRK_ALWAYS_POLL },
634 + { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019), HID_QUIRK_ALWAYS_POLL },
635 + { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E), HID_QUIRK_ALWAYS_POLL },
636 +@@ -158,6 +159,7 @@ static const struct hid_device_id hid_quirks[] = {
637 + { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
638 + { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_2), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
639 + { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X52_PRO), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
640 ++ { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_X65), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
641 + { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS },
642 + { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS },
643 + { HID_USB_DEVICE(USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB), HID_QUIRK_NOGET },
644 +@@ -212,6 +214,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
645 + { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
646 + { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
647 + { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
648 ++ { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95) },
649 + #endif
650 + #if IS_ENABLED(CONFIG_HID_ACCUTOUCH)
651 + { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
652 +diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
653 +index 3dd7d32467378..f9983145d4e70 100644
654 +--- a/drivers/hid/hid-sensor-hub.c
655 ++++ b/drivers/hid/hid-sensor-hub.c
656 +@@ -210,16 +210,21 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
657 + buffer_size = buffer_size / sizeof(__s32);
658 + if (buffer_size) {
659 + for (i = 0; i < buffer_size; ++i) {
660 +- hid_set_field(report->field[field_index], i,
661 +- (__force __s32)cpu_to_le32(*buf32));
662 ++ ret = hid_set_field(report->field[field_index], i,
663 ++ (__force __s32)cpu_to_le32(*buf32));
664 ++ if (ret)
665 ++ goto done_proc;
666 ++
667 + ++buf32;
668 + }
669 + }
670 + if (remaining_bytes) {
671 + value = 0;
672 + memcpy(&value, (u8 *)buf32, remaining_bytes);
673 +- hid_set_field(report->field[field_index], i,
674 +- (__force __s32)cpu_to_le32(value));
675 ++ ret = hid_set_field(report->field[field_index], i,
676 ++ (__force __s32)cpu_to_le32(value));
677 ++ if (ret)
678 ++ goto done_proc;
679 + }
680 + hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
681 + hid_hw_wait(hsdev->hdev);
682 +diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
683 +index 17a29ee0ac6c2..8d4ac4b9fb9da 100644
684 +--- a/drivers/hid/usbhid/hid-core.c
685 ++++ b/drivers/hid/usbhid/hid-core.c
686 +@@ -374,7 +374,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
687 + raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report;
688 + dir = usbhid->ctrl[usbhid->ctrltail].dir;
689 +
690 +- len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
691 ++ len = hid_report_len(report);
692 + if (dir == USB_DIR_OUT) {
693 + usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0);
694 + usbhid->urbctrl->transfer_buffer_length = len;
695 +diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
696 +index c84c8bf2bc20e..fc99ad8e4a388 100644
697 +--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
698 ++++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
699 +@@ -3815,6 +3815,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
700 + dev_err(&pdev->dev,
701 + "invalid sram_size %dB or board span %ldB\n",
702 + mgp->sram_size, mgp->board_span);
703 ++ status = -EINVAL;
704 + goto abort_with_ioremap;
705 + }
706 + memcpy_fromio(mgp->eeprom_strings,
707 +diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
708 +index b869b686e9623..16d71cc5a50eb 100644
709 +--- a/drivers/nvme/target/loop.c
710 ++++ b/drivers/nvme/target/loop.c
711 +@@ -251,7 +251,8 @@ static const struct blk_mq_ops nvme_loop_admin_mq_ops = {
712 +
713 + static void nvme_loop_destroy_admin_queue(struct nvme_loop_ctrl *ctrl)
714 + {
715 +- clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags);
716 ++ if (!test_and_clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags))
717 ++ return;
718 + nvmet_sq_destroy(&ctrl->queues[0].nvme_sq);
719 + blk_cleanup_queue(ctrl->ctrl.admin_q);
720 + blk_cleanup_queue(ctrl->ctrl.fabrics_q);
721 +@@ -287,6 +288,7 @@ static void nvme_loop_destroy_io_queues(struct nvme_loop_ctrl *ctrl)
722 + clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[i].flags);
723 + nvmet_sq_destroy(&ctrl->queues[i].nvme_sq);
724 + }
725 ++ ctrl->ctrl.queue_count = 1;
726 + }
727 +
728 + static int nvme_loop_init_io_queues(struct nvme_loop_ctrl *ctrl)
729 +@@ -393,6 +395,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
730 + return 0;
731 +
732 + out_cleanup_queue:
733 ++ clear_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags);
734 + blk_cleanup_queue(ctrl->ctrl.admin_q);
735 + out_cleanup_fabrics_q:
736 + blk_cleanup_queue(ctrl->ctrl.fabrics_q);
737 +@@ -450,8 +453,10 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
738 + nvme_loop_shutdown_ctrl(ctrl);
739 +
740 + if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
741 +- /* state change failure should never happen */
742 +- WARN_ON_ONCE(1);
743 ++ if (ctrl->ctrl.state != NVME_CTRL_DELETING &&
744 ++ ctrl->ctrl.state != NVME_CTRL_DELETING_NOIO)
745 ++ /* state change failure for non-deleted ctrl? */
746 ++ WARN_ON_ONCE(1);
747 + return;
748 + }
749 +
750 +diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
751 +index a464d0a4f4653..846a02de4d510 100644
752 +--- a/drivers/scsi/qedf/qedf_main.c
753 ++++ b/drivers/scsi/qedf/qedf_main.c
754 +@@ -1827,22 +1827,20 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
755 + fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
756 + QEDF_WARN(&(base_qedf->dbg_ctx), "Failed to create vport, "
757 + "WWPN (0x%s) already exists.\n", buf);
758 +- goto err1;
759 ++ return rc;
760 + }
761 +
762 + if (atomic_read(&base_qedf->link_state) != QEDF_LINK_UP) {
763 + QEDF_WARN(&(base_qedf->dbg_ctx), "Cannot create vport "
764 + "because link is not up.\n");
765 +- rc = -EIO;
766 +- goto err1;
767 ++ return -EIO;
768 + }
769 +
770 + vn_port = libfc_vport_create(vport, sizeof(struct qedf_ctx));
771 + if (!vn_port) {
772 + QEDF_WARN(&(base_qedf->dbg_ctx), "Could not create lport "
773 + "for vport.\n");
774 +- rc = -ENOMEM;
775 +- goto err1;
776 ++ return -ENOMEM;
777 + }
778 +
779 + fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
780 +@@ -1866,7 +1864,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
781 + if (rc) {
782 + QEDF_ERR(&(base_qedf->dbg_ctx), "Could not allocate memory "
783 + "for lport stats.\n");
784 +- goto err2;
785 ++ goto err;
786 + }
787 +
788 + fc_set_wwnn(vn_port, vport->node_name);
789 +@@ -1884,7 +1882,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
790 + if (rc) {
791 + QEDF_WARN(&base_qedf->dbg_ctx,
792 + "Error adding Scsi_Host rc=0x%x.\n", rc);
793 +- goto err2;
794 ++ goto err;
795 + }
796 +
797 + /* Set default dev_loss_tmo based on module parameter */
798 +@@ -1925,9 +1923,10 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
799 + vport_qedf->dbg_ctx.host_no = vn_port->host->host_no;
800 + vport_qedf->dbg_ctx.pdev = base_qedf->pdev;
801 +
802 +-err2:
803 ++ return 0;
804 ++
805 ++err:
806 + scsi_host_put(vn_port->host);
807 +-err1:
808 + return rc;
809 + }
810 +
811 +@@ -1968,8 +1967,7 @@ static int qedf_vport_destroy(struct fc_vport *vport)
812 + fc_lport_free_stats(vn_port);
813 +
814 + /* Release Scsi_Host */
815 +- if (vn_port->host)
816 +- scsi_host_put(vn_port->host);
817 ++ scsi_host_put(vn_port->host);
818 +
819 + out:
820 + return 0;
821 +diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
822 +index ba84244c1b4f6..9a8f9f902f3b4 100644
823 +--- a/drivers/scsi/scsi_devinfo.c
824 ++++ b/drivers/scsi/scsi_devinfo.c
825 +@@ -184,6 +184,7 @@ static struct {
826 + {"HP", "C3323-300", "4269", BLIST_NOTQ},
827 + {"HP", "C5713A", NULL, BLIST_NOREPORTLUN},
828 + {"HP", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2},
829 ++ {"HPE", "OPEN-", "*", BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES},
830 + {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
831 + {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
832 + {"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
833 +diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
834 +index 484f0ba0a65bb..61b79804d462c 100644
835 +--- a/drivers/target/target_core_transport.c
836 ++++ b/drivers/target/target_core_transport.c
837 +@@ -3038,9 +3038,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
838 + __releases(&cmd->t_state_lock)
839 + __acquires(&cmd->t_state_lock)
840 + {
841 +-
842 +- assert_spin_locked(&cmd->t_state_lock);
843 +- WARN_ON_ONCE(!irqs_disabled());
844 ++ lockdep_assert_held(&cmd->t_state_lock);
845 +
846 + if (fabric_stop)
847 + cmd->transport_state |= CMD_T_FABRIC_STOP;
848 +diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
849 +index b39b339feddc9..16fb0184ce5e1 100644
850 +--- a/fs/gfs2/file.c
851 ++++ b/fs/gfs2/file.c
852 +@@ -938,8 +938,11 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
853 + current->backing_dev_info = inode_to_bdi(inode);
854 + buffered = iomap_file_buffered_write(iocb, from, &gfs2_iomap_ops);
855 + current->backing_dev_info = NULL;
856 +- if (unlikely(buffered <= 0))
857 ++ if (unlikely(buffered <= 0)) {
858 ++ if (!ret)
859 ++ ret = buffered;
860 + goto out_unlock;
861 ++ }
862 +
863 + /*
864 + * We need to ensure that the page cache pages are written to
865 +diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
866 +index ea2f2de448063..cd43c481df4b4 100644
867 +--- a/fs/gfs2/glock.c
868 ++++ b/fs/gfs2/glock.c
869 +@@ -569,6 +569,16 @@ out_locked:
870 + spin_unlock(&gl->gl_lockref.lock);
871 + }
872 +
873 ++static bool is_system_glock(struct gfs2_glock *gl)
874 ++{
875 ++ struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
876 ++ struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
877 ++
878 ++ if (gl == m_ip->i_gl)
879 ++ return true;
880 ++ return false;
881 ++}
882 ++
883 + /**
884 + * do_xmote - Calls the DLM to change the state of a lock
885 + * @gl: The lock state
886 +@@ -658,17 +668,25 @@ skip_inval:
887 + * to see sd_log_error and withdraw, and in the meantime, requeue the
888 + * work for later.
889 + *
890 ++ * We make a special exception for some system glocks, such as the
891 ++ * system statfs inode glock, which needs to be granted before the
892 ++ * gfs2_quotad daemon can exit, and that exit needs to finish before
893 ++ * we can unmount the withdrawn file system.
894 ++ *
895 + * However, if we're just unlocking the lock (say, for unmount, when
896 + * gfs2_gl_hash_clear calls clear_glock) and recovery is complete
897 + * then it's okay to tell dlm to unlock it.
898 + */
899 + if (unlikely(sdp->sd_log_error && !gfs2_withdrawn(sdp)))
900 + gfs2_withdraw_delayed(sdp);
901 +- if (glock_blocked_by_withdraw(gl)) {
902 +- if (target != LM_ST_UNLOCKED ||
903 +- test_bit(SDF_WITHDRAW_RECOVERY, &sdp->sd_flags)) {
904 ++ if (glock_blocked_by_withdraw(gl) &&
905 ++ (target != LM_ST_UNLOCKED ||
906 ++ test_bit(SDF_WITHDRAW_RECOVERY, &sdp->sd_flags))) {
907 ++ if (!is_system_glock(gl)) {
908 + gfs2_glock_queue_work(gl, GL_GLOCK_DFT_HOLD);
909 + goto out;
910 ++ } else {
911 ++ clear_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags);
912 + }
913 + }
914 +
915 +@@ -1766,6 +1784,7 @@ __acquires(&lru_lock)
916 + while(!list_empty(list)) {
917 + gl = list_first_entry(list, struct gfs2_glock, gl_lru);
918 + list_del_init(&gl->gl_lru);
919 ++ clear_bit(GLF_LRU, &gl->gl_flags);
920 + if (!spin_trylock(&gl->gl_lockref.lock)) {
921 + add_back_to_lru:
922 + list_add(&gl->gl_lru, &lru_list);
923 +@@ -1811,7 +1830,6 @@ static long gfs2_scan_glock_lru(int nr)
924 + if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
925 + list_move(&gl->gl_lru, &dispose);
926 + atomic_dec(&lru_count);
927 +- clear_bit(GLF_LRU, &gl->gl_flags);
928 + freed++;
929 + continue;
930 + }
931 +diff --git a/include/linux/hid.h b/include/linux/hid.h
932 +index 8578db50ad734..6ed2a97eb55f1 100644
933 +--- a/include/linux/hid.h
934 ++++ b/include/linux/hid.h
935 +@@ -1156,8 +1156,7 @@ static inline void hid_hw_wait(struct hid_device *hdev)
936 + */
937 + static inline u32 hid_report_len(struct hid_report *report)
938 + {
939 +- /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
940 +- return ((report->size - 1) >> 3) + 1 + (report->id > 0);
941 ++ return DIV_ROUND_UP(report->size, 8) + (report->id > 0);
942 + }
943 +
944 + int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
945 +diff --git a/include/linux/host1x.h b/include/linux/host1x.h
946 +index 9eb77c87a83b0..ed0005ce4285c 100644
947 +--- a/include/linux/host1x.h
948 ++++ b/include/linux/host1x.h
949 +@@ -320,12 +320,30 @@ static inline struct host1x_device *to_host1x_device(struct device *dev)
950 + int host1x_device_init(struct host1x_device *device);
951 + int host1x_device_exit(struct host1x_device *device);
952 +
953 +-int __host1x_client_register(struct host1x_client *client,
954 +- struct lock_class_key *key);
955 +-#define host1x_client_register(class) \
956 +- ({ \
957 +- static struct lock_class_key __key; \
958 +- __host1x_client_register(class, &__key); \
959 ++void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key);
960 ++void host1x_client_exit(struct host1x_client *client);
961 ++
962 ++#define host1x_client_init(client) \
963 ++ ({ \
964 ++ static struct lock_class_key __key; \
965 ++ __host1x_client_init(client, &__key); \
966 ++ })
967 ++
968 ++int __host1x_client_register(struct host1x_client *client);
969 ++
970 ++/*
971 ++ * Note that this wrapper calls __host1x_client_init() for compatibility
972 ++ * with existing callers. Callers that want to separately initialize and
973 ++ * register a host1x client must first initialize using either of the
974 ++ * __host1x_client_init() or host1x_client_init() functions and then use
975 ++ * the low-level __host1x_client_register() function to avoid the client
976 ++ * getting reinitialized.
977 ++ */
978 ++#define host1x_client_register(client) \
979 ++ ({ \
980 ++ static struct lock_class_key __key; \
981 ++ __host1x_client_init(client, &__key); \
982 ++ __host1x_client_register(client); \
983 + })
984 +
985 + int host1x_client_unregister(struct host1x_client *client);
986 +diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
987 +index ee93428ced9a1..225ec87d4f228 100644
988 +--- a/include/uapi/linux/input-event-codes.h
989 ++++ b/include/uapi/linux/input-event-codes.h
990 +@@ -611,6 +611,7 @@
991 + #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */
992 + #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */
993 + #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */
994 ++#define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */
995 +
996 + #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
997 + #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
998 +diff --git a/net/compat.c b/net/compat.c
999 +index ddd15af3a2837..210fc3b4d0d83 100644
1000 +--- a/net/compat.c
1001 ++++ b/net/compat.c
1002 +@@ -177,7 +177,7 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
1003 + if (kcmlen > stackbuf_size)
1004 + kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL);
1005 + if (kcmsg == NULL)
1006 +- return -ENOBUFS;
1007 ++ return -ENOMEM;
1008 +
1009 + /* Now copy them over neatly. */
1010 + memset(kcmsg, 0, kcmlen);
1011 +diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
1012 +index 7bcfb16854cbb..9258ffc4ebffc 100644
1013 +--- a/net/core/fib_rules.c
1014 ++++ b/net/core/fib_rules.c
1015 +@@ -1168,7 +1168,7 @@ static void notify_rule_change(int event, struct fib_rule *rule,
1016 + {
1017 + struct net *net;
1018 + struct sk_buff *skb;
1019 +- int err = -ENOBUFS;
1020 ++ int err = -ENOMEM;
1021 +
1022 + net = ops->fro_net;
1023 + skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL);
1024 +diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
1025 +index eae8e87930cd7..83894723ebeea 100644
1026 +--- a/net/core/rtnetlink.c
1027 ++++ b/net/core/rtnetlink.c
1028 +@@ -4842,8 +4842,10 @@ static int rtnl_bridge_notify(struct net_device *dev)
1029 + if (err < 0)
1030 + goto errout;
1031 +
1032 +- if (!skb->len)
1033 ++ if (!skb->len) {
1034 ++ err = -EINVAL;
1035 + goto errout;
1036 ++ }
1037 +
1038 + rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
1039 + return 0;
1040 +diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
1041 +index f0b47d43c9f6e..b34e4f827e756 100644
1042 +--- a/net/ieee802154/nl802154.c
1043 ++++ b/net/ieee802154/nl802154.c
1044 +@@ -1298,19 +1298,20 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla,
1045 + if (!nla || nla_parse_nested_deprecated(attrs, NL802154_DEV_ADDR_ATTR_MAX, nla, nl802154_dev_addr_policy, NULL))
1046 + return -EINVAL;
1047 +
1048 +- if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] ||
1049 +- !attrs[NL802154_DEV_ADDR_ATTR_MODE] ||
1050 +- !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
1051 +- attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
1052 ++ if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] || !attrs[NL802154_DEV_ADDR_ATTR_MODE])
1053 + return -EINVAL;
1054 +
1055 + addr->pan_id = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_PAN_ID]);
1056 + addr->mode = nla_get_u32(attrs[NL802154_DEV_ADDR_ATTR_MODE]);
1057 + switch (addr->mode) {
1058 + case NL802154_DEV_ADDR_SHORT:
1059 ++ if (!attrs[NL802154_DEV_ADDR_ATTR_SHORT])
1060 ++ return -EINVAL;
1061 + addr->short_addr = nla_get_le16(attrs[NL802154_DEV_ADDR_ATTR_SHORT]);
1062 + break;
1063 + case NL802154_DEV_ADDR_EXTENDED:
1064 ++ if (!attrs[NL802154_DEV_ADDR_ATTR_EXTENDED])
1065 ++ return -EINVAL;
1066 + addr->extended_addr = nla_get_le64(attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]);
1067 + break;
1068 + default:
1069 +diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
1070 +index 3cd13e1bc6a70..213a1c91507d9 100644
1071 +--- a/net/ipv4/ipconfig.c
1072 ++++ b/net/ipv4/ipconfig.c
1073 +@@ -870,7 +870,7 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
1074 +
1075 +
1076 + /*
1077 +- * Copy BOOTP-supplied string if not already set.
1078 ++ * Copy BOOTP-supplied string
1079 + */
1080 + static int __init ic_bootp_string(char *dest, char *src, int len, int max)
1081 + {
1082 +@@ -919,12 +919,15 @@ static void __init ic_do_bootp_ext(u8 *ext)
1083 + }
1084 + break;
1085 + case 12: /* Host name */
1086 +- ic_bootp_string(utsname()->nodename, ext+1, *ext,
1087 +- __NEW_UTS_LEN);
1088 +- ic_host_name_set = 1;
1089 ++ if (!ic_host_name_set) {
1090 ++ ic_bootp_string(utsname()->nodename, ext+1, *ext,
1091 ++ __NEW_UTS_LEN);
1092 ++ ic_host_name_set = 1;
1093 ++ }
1094 + break;
1095 + case 15: /* Domain name (DNS) */
1096 +- ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain));
1097 ++ if (!ic_domain[0])
1098 ++ ic_bootp_string(ic_domain, ext+1, *ext, sizeof(ic_domain));
1099 + break;
1100 + case 17: /* Root path */
1101 + if (!root_server_path[0])
1102 +diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
1103 +index e65a50192432c..03ed170b8125e 100644
1104 +--- a/net/x25/af_x25.c
1105 ++++ b/net/x25/af_x25.c
1106 +@@ -546,7 +546,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol,
1107 + if (protocol)
1108 + goto out;
1109 +
1110 +- rc = -ENOBUFS;
1111 ++ rc = -ENOMEM;
1112 + if ((sk = x25_alloc_socket(net, kern)) == NULL)
1113 + goto out;
1114 +