1 |
commit: 6104eea26c521a7aaa63ea1c1f5bec42bfe213fe |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 3 12:27:38 2023 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 12:27:38 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6104eea2 |
7 |
|
8 |
Linux patch 6.2.2 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1001_linux-6.2.2.patch | 560 +++++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 564 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index b0db3406..b2b768d6 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -47,6 +47,10 @@ Patch: 1000_linux-6.2.1.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 6.2.1 |
23 |
|
24 |
+Patch: 1001_linux-6.2.2.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 6.2.2 |
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/1001_linux-6.2.2.patch b/1001_linux-6.2.2.patch |
33 |
new file mode 100644 |
34 |
index 00000000..d24dc949 |
35 |
--- /dev/null |
36 |
+++ b/1001_linux-6.2.2.patch |
37 |
@@ -0,0 +1,560 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index f26824f367a99..1836ddaf2c94c 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 6 |
45 |
+ PATCHLEVEL = 2 |
46 |
+-SUBLEVEL = 1 |
47 |
++SUBLEVEL = 2 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Hurr durr I'ma ninja sloth |
50 |
+ |
51 |
+diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts |
52 |
+index 7069f51bc120e..99136adb1857f 100644 |
53 |
+--- a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts |
54 |
++++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts |
55 |
+@@ -24,7 +24,7 @@ |
56 |
+ snps,dis_enblslpm_quirk; |
57 |
+ snps,dis_u2_susphy_quirk; |
58 |
+ snps,dis_u3_susphy_quirk; |
59 |
+- snps,usb2_gadget_lpm_disable; |
60 |
++ snps,usb2-gadget-lpm-disable; |
61 |
+ phy-names = "usb2-phy", "usb3-phy"; |
62 |
+ phys = <&usb0_hsphy0>, <&usb0_ssphy0>; |
63 |
+ }; |
64 |
+diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts |
65 |
+index a3cfa8113ffb2..4c960f455461c 100644 |
66 |
+--- a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts |
67 |
++++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts |
68 |
+@@ -24,7 +24,7 @@ |
69 |
+ snps,dis_enblslpm_quirk; |
70 |
+ snps,dis_u2_susphy_quirk; |
71 |
+ snps,dis_u3_susphy_quirk; |
72 |
+- snps,usb2_gadget_lpm_disable; |
73 |
++ snps,usb2-gadget-lpm-disable; |
74 |
+ phy-names = "usb2-phy", "usb3-phy"; |
75 |
+ phys = <&usb1_hsphy0>, <&usb1_ssphy0>; |
76 |
+ }; |
77 |
+diff --git a/arch/arm64/crypto/sm4-ce-gcm-glue.c b/arch/arm64/crypto/sm4-ce-gcm-glue.c |
78 |
+index c450a2025ca9a..73bfb6972d3a3 100644 |
79 |
+--- a/arch/arm64/crypto/sm4-ce-gcm-glue.c |
80 |
++++ b/arch/arm64/crypto/sm4-ce-gcm-glue.c |
81 |
+@@ -135,22 +135,23 @@ static void gcm_calculate_auth_mac(struct aead_request *req, u8 ghash[]) |
82 |
+ } |
83 |
+ |
84 |
+ static int gcm_crypt(struct aead_request *req, struct skcipher_walk *walk, |
85 |
+- struct sm4_gcm_ctx *ctx, u8 ghash[], |
86 |
++ u8 ghash[], int err, |
87 |
+ void (*sm4_ce_pmull_gcm_crypt)(const u32 *rkey_enc, |
88 |
+ u8 *dst, const u8 *src, u8 *iv, |
89 |
+ unsigned int nbytes, u8 *ghash, |
90 |
+ const u8 *ghash_table, const u8 *lengths)) |
91 |
+ { |
92 |
++ struct crypto_aead *aead = crypto_aead_reqtfm(req); |
93 |
++ struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); |
94 |
+ u8 __aligned(8) iv[SM4_BLOCK_SIZE]; |
95 |
+ be128 __aligned(8) lengths; |
96 |
+- int err; |
97 |
+ |
98 |
+ memset(ghash, 0, SM4_BLOCK_SIZE); |
99 |
+ |
100 |
+ lengths.a = cpu_to_be64(req->assoclen * 8); |
101 |
+ lengths.b = cpu_to_be64(walk->total * 8); |
102 |
+ |
103 |
+- memcpy(iv, walk->iv, GCM_IV_SIZE); |
104 |
++ memcpy(iv, req->iv, GCM_IV_SIZE); |
105 |
+ put_unaligned_be32(2, iv + GCM_IV_SIZE); |
106 |
+ |
107 |
+ kernel_neon_begin(); |
108 |
+@@ -158,49 +159,51 @@ static int gcm_crypt(struct aead_request *req, struct skcipher_walk *walk, |
109 |
+ if (req->assoclen) |
110 |
+ gcm_calculate_auth_mac(req, ghash); |
111 |
+ |
112 |
+- do { |
113 |
++ while (walk->nbytes) { |
114 |
+ unsigned int tail = walk->nbytes % SM4_BLOCK_SIZE; |
115 |
+ const u8 *src = walk->src.virt.addr; |
116 |
+ u8 *dst = walk->dst.virt.addr; |
117 |
+ |
118 |
+ if (walk->nbytes == walk->total) { |
119 |
+- tail = 0; |
120 |
+- |
121 |
+ sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv, |
122 |
+ walk->nbytes, ghash, |
123 |
+ ctx->ghash_table, |
124 |
+ (const u8 *)&lengths); |
125 |
+- } else if (walk->nbytes - tail) { |
126 |
+- sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv, |
127 |
+- walk->nbytes - tail, ghash, |
128 |
+- ctx->ghash_table, NULL); |
129 |
++ |
130 |
++ kernel_neon_end(); |
131 |
++ |
132 |
++ return skcipher_walk_done(walk, 0); |
133 |
+ } |
134 |
+ |
135 |
++ sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, dst, src, iv, |
136 |
++ walk->nbytes - tail, ghash, |
137 |
++ ctx->ghash_table, NULL); |
138 |
++ |
139 |
+ kernel_neon_end(); |
140 |
+ |
141 |
+ err = skcipher_walk_done(walk, tail); |
142 |
+- if (err) |
143 |
+- return err; |
144 |
+- if (walk->nbytes) |
145 |
+- kernel_neon_begin(); |
146 |
+- } while (walk->nbytes > 0); |
147 |
+ |
148 |
+- return 0; |
149 |
++ kernel_neon_begin(); |
150 |
++ } |
151 |
++ |
152 |
++ sm4_ce_pmull_gcm_crypt(ctx->key.rkey_enc, NULL, NULL, iv, |
153 |
++ walk->nbytes, ghash, ctx->ghash_table, |
154 |
++ (const u8 *)&lengths); |
155 |
++ |
156 |
++ kernel_neon_end(); |
157 |
++ |
158 |
++ return err; |
159 |
+ } |
160 |
+ |
161 |
+ static int gcm_encrypt(struct aead_request *req) |
162 |
+ { |
163 |
+ struct crypto_aead *aead = crypto_aead_reqtfm(req); |
164 |
+- struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); |
165 |
+ u8 __aligned(8) ghash[SM4_BLOCK_SIZE]; |
166 |
+ struct skcipher_walk walk; |
167 |
+ int err; |
168 |
+ |
169 |
+ err = skcipher_walk_aead_encrypt(&walk, req, false); |
170 |
+- if (err) |
171 |
+- return err; |
172 |
+- |
173 |
+- err = gcm_crypt(req, &walk, ctx, ghash, sm4_ce_pmull_gcm_enc); |
174 |
++ err = gcm_crypt(req, &walk, ghash, err, sm4_ce_pmull_gcm_enc); |
175 |
+ if (err) |
176 |
+ return err; |
177 |
+ |
178 |
+@@ -215,17 +218,13 @@ static int gcm_decrypt(struct aead_request *req) |
179 |
+ { |
180 |
+ struct crypto_aead *aead = crypto_aead_reqtfm(req); |
181 |
+ unsigned int authsize = crypto_aead_authsize(aead); |
182 |
+- struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); |
183 |
+ u8 __aligned(8) ghash[SM4_BLOCK_SIZE]; |
184 |
+ u8 authtag[SM4_BLOCK_SIZE]; |
185 |
+ struct skcipher_walk walk; |
186 |
+ int err; |
187 |
+ |
188 |
+ err = skcipher_walk_aead_decrypt(&walk, req, false); |
189 |
+- if (err) |
190 |
+- return err; |
191 |
+- |
192 |
+- err = gcm_crypt(req, &walk, ctx, ghash, sm4_ce_pmull_gcm_dec); |
193 |
++ err = gcm_crypt(req, &walk, ghash, err, sm4_ce_pmull_gcm_dec); |
194 |
+ if (err) |
195 |
+ return err; |
196 |
+ |
197 |
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
198 |
+index 9c7b69d377bd3..af16d6bb974b7 100644 |
199 |
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
200 |
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |
201 |
+@@ -10359,6 +10359,7 @@ int amdgpu_dm_process_dmub_aux_transfer_sync( |
202 |
+ ret = p_notify->aux_reply.length; |
203 |
+ *operation_result = p_notify->result; |
204 |
+ out: |
205 |
++ reinit_completion(&adev->dm.dmub_aux_transfer_done); |
206 |
+ mutex_unlock(&adev->dm.dpia_aux_lock); |
207 |
+ return ret; |
208 |
+ } |
209 |
+@@ -10386,6 +10387,8 @@ int amdgpu_dm_process_dmub_set_config_sync( |
210 |
+ *operation_result = SET_CONFIG_UNKNOWN_ERROR; |
211 |
+ } |
212 |
+ |
213 |
++ if (!is_cmd_complete) |
214 |
++ reinit_completion(&adev->dm.dmub_aux_transfer_done); |
215 |
+ mutex_unlock(&adev->dm.dpia_aux_lock); |
216 |
+ return ret; |
217 |
+ } |
218 |
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c |
219 |
+index a0741794db62a..8e824dc81dede 100644 |
220 |
+--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c |
221 |
++++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c |
222 |
+@@ -391,3 +391,27 @@ void dcn314_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx) |
223 |
+ pipe_ctx->stream_res.stream_enc->funcs->set_input_mode(pipe_ctx->stream_res.stream_enc, |
224 |
+ pix_per_cycle); |
225 |
+ } |
226 |
++ |
227 |
++void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool power_on) |
228 |
++{ |
229 |
++ struct dc_context *ctx = hws->ctx; |
230 |
++ union dmub_rb_cmd cmd; |
231 |
++ |
232 |
++ if (hws->ctx->dc->debug.disable_hubp_power_gate) |
233 |
++ return; |
234 |
++ |
235 |
++ PERF_TRACE(); |
236 |
++ |
237 |
++ memset(&cmd, 0, sizeof(cmd)); |
238 |
++ cmd.domain_control.header.type = DMUB_CMD__VBIOS; |
239 |
++ cmd.domain_control.header.sub_type = DMUB_CMD__VBIOS_DOMAIN_CONTROL; |
240 |
++ cmd.domain_control.header.payload_bytes = sizeof(cmd.domain_control.data); |
241 |
++ cmd.domain_control.data.inst = hubp_inst; |
242 |
++ cmd.domain_control.data.power_gate = !power_on; |
243 |
++ |
244 |
++ dc_dmub_srv_cmd_queue(ctx->dmub_srv, &cmd); |
245 |
++ dc_dmub_srv_cmd_execute(ctx->dmub_srv); |
246 |
++ dc_dmub_srv_wait_idle(ctx->dmub_srv); |
247 |
++ |
248 |
++ PERF_TRACE(); |
249 |
++} |
250 |
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h |
251 |
+index 244280298212c..c419d3dbdfee6 100644 |
252 |
+--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h |
253 |
++++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h |
254 |
+@@ -41,4 +41,6 @@ unsigned int dcn314_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsig |
255 |
+ |
256 |
+ void dcn314_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx); |
257 |
+ |
258 |
++void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool power_on); |
259 |
++ |
260 |
+ #endif /* __DC_HWSS_DCN314_H__ */ |
261 |
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c |
262 |
+index 31feb4b0edee9..25f345ff6c8f0 100644 |
263 |
+--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c |
264 |
++++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c |
265 |
+@@ -137,7 +137,7 @@ static const struct hwseq_private_funcs dcn314_private_funcs = { |
266 |
+ .plane_atomic_disable = dcn20_plane_atomic_disable, |
267 |
+ .plane_atomic_power_down = dcn10_plane_atomic_power_down, |
268 |
+ .enable_power_gating_plane = dcn314_enable_power_gating_plane, |
269 |
+- .hubp_pg_control = dcn31_hubp_pg_control, |
270 |
++ .hubp_pg_control = dcn314_hubp_pg_control, |
271 |
+ .program_all_writeback_pipes_in_tree = dcn30_program_all_writeback_pipes_in_tree, |
272 |
+ .update_odm = dcn314_update_odm, |
273 |
+ .dsc_pg_control = dcn314_dsc_pg_control, |
274 |
+diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h |
275 |
+index 33907feefebbd..8fea8e42cc174 100644 |
276 |
+--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h |
277 |
++++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h |
278 |
+@@ -457,6 +457,10 @@ enum dmub_cmd_vbios_type { |
279 |
+ * Query DP alt status on a transmitter. |
280 |
+ */ |
281 |
+ DMUB_CMD__VBIOS_TRANSMITTER_QUERY_DP_ALT = 26, |
282 |
++ /** |
283 |
++ * Controls domain power gating |
284 |
++ */ |
285 |
++ DMUB_CMD__VBIOS_DOMAIN_CONTROL = 28, |
286 |
+ }; |
287 |
+ |
288 |
+ //============================================================================== |
289 |
+@@ -1204,6 +1208,23 @@ struct dmub_rb_cmd_dig1_transmitter_control { |
290 |
+ union dmub_cmd_dig1_transmitter_control_data transmitter_control; /**< payload */ |
291 |
+ }; |
292 |
+ |
293 |
++/** |
294 |
++ * struct dmub_rb_cmd_domain_control_data - Data for DOMAIN power control |
295 |
++ */ |
296 |
++struct dmub_rb_cmd_domain_control_data { |
297 |
++ uint8_t inst : 6; /**< DOMAIN instance to control */ |
298 |
++ uint8_t power_gate : 1; /**< 1=power gate, 0=power up */ |
299 |
++ uint8_t reserved[3]; /**< Reserved for future use */ |
300 |
++}; |
301 |
++ |
302 |
++/** |
303 |
++ * struct dmub_rb_cmd_domain_control - Controls DOMAIN power gating |
304 |
++ */ |
305 |
++struct dmub_rb_cmd_domain_control { |
306 |
++ struct dmub_cmd_header header; /**< header */ |
307 |
++ struct dmub_rb_cmd_domain_control_data data; /**< payload */ |
308 |
++}; |
309 |
++ |
310 |
+ /** |
311 |
+ * DPIA tunnel command parameters. |
312 |
+ */ |
313 |
+@@ -3231,6 +3252,10 @@ union dmub_rb_cmd { |
314 |
+ * Definition of a DMUB_CMD__VBIOS_DIG1_TRANSMITTER_CONTROL command. |
315 |
+ */ |
316 |
+ struct dmub_rb_cmd_dig1_transmitter_control dig1_transmitter_control; |
317 |
++ /** |
318 |
++ * Definition of a DMUB_CMD__VBIOS_DOMAIN_CONTROL command. |
319 |
++ */ |
320 |
++ struct dmub_rb_cmd_domain_control domain_control; |
321 |
+ /** |
322 |
+ * Definition of a DMUB_CMD__PSR_SET_VERSION command. |
323 |
+ */ |
324 |
+diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c |
325 |
+index 4ef38279b64c9..2a8336b1847a5 100644 |
326 |
+--- a/drivers/net/wireless/realtek/rtw88/usb.c |
327 |
++++ b/drivers/net/wireless/realtek/rtw88/usb.c |
328 |
+@@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s |
329 |
+ return -ENOMEM; |
330 |
+ |
331 |
+ usb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context); |
332 |
++ urb->transfer_flags |= URB_ZERO_PACKET; |
333 |
+ ret = usb_submit_urb(urb, GFP_ATOMIC); |
334 |
+ |
335 |
+ usb_free_urb(urb); |
336 |
+@@ -413,24 +414,11 @@ static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf, |
337 |
+ u32 size) |
338 |
+ { |
339 |
+ const struct rtw_chip_info *chip = rtwdev->chip; |
340 |
+- struct rtw_usb *rtwusb; |
341 |
+ struct rtw_tx_pkt_info pkt_info = {0}; |
342 |
+- u32 len, desclen; |
343 |
+- |
344 |
+- rtwusb = rtw_get_usb_priv(rtwdev); |
345 |
+ |
346 |
+ pkt_info.tx_pkt_size = size; |
347 |
+ pkt_info.qsel = TX_DESC_QSEL_BEACON; |
348 |
+- |
349 |
+- desclen = chip->tx_pkt_desc_sz; |
350 |
+- len = desclen + size; |
351 |
+- if (len % rtwusb->bulkout_size == 0) { |
352 |
+- len += RTW_USB_PACKET_OFFSET_SZ; |
353 |
+- pkt_info.offset = desclen + RTW_USB_PACKET_OFFSET_SZ; |
354 |
+- pkt_info.pkt_offset = 1; |
355 |
+- } else { |
356 |
+- pkt_info.offset = desclen; |
357 |
+- } |
358 |
++ pkt_info.offset = chip->tx_pkt_desc_sz; |
359 |
+ |
360 |
+ return rtw_usb_write_data(rtwdev, &pkt_info, buf); |
361 |
+ } |
362 |
+@@ -471,9 +459,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev, |
363 |
+ u8 *pkt_desc; |
364 |
+ int ep; |
365 |
+ |
366 |
++ pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb); |
367 |
+ pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz); |
368 |
+ memset(pkt_desc, 0, chip->tx_pkt_desc_sz); |
369 |
+- pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb); |
370 |
+ ep = qsel_to_ep(rtwusb, pkt_info->qsel); |
371 |
+ rtw_tx_fill_tx_desc(pkt_info, skb); |
372 |
+ rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data); |
373 |
+diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c |
374 |
+index f566eb1839dc5..71e091f879f0e 100644 |
375 |
+--- a/drivers/tty/vt/vc_screen.c |
376 |
++++ b/drivers/tty/vt/vc_screen.c |
377 |
+@@ -403,10 +403,11 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) |
378 |
+ unsigned int this_round, skip = 0; |
379 |
+ int size; |
380 |
+ |
381 |
+- ret = -ENXIO; |
382 |
+ vc = vcs_vc(inode, &viewed); |
383 |
+- if (!vc) |
384 |
+- goto unlock_out; |
385 |
++ if (!vc) { |
386 |
++ ret = -ENXIO; |
387 |
++ break; |
388 |
++ } |
389 |
+ |
390 |
+ /* Check whether we are above size each round, |
391 |
+ * as copy_to_user at the end of this loop |
392 |
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c |
393 |
+index 9eca403af2a85..97a0f8faea6e5 100644 |
394 |
+--- a/drivers/usb/core/hub.c |
395 |
++++ b/drivers/usb/core/hub.c |
396 |
+@@ -2389,9 +2389,8 @@ static int usb_enumerate_device_otg(struct usb_device *udev) |
397 |
+ * usb_enumerate_device - Read device configs/intfs/otg (usbcore-internal) |
398 |
+ * @udev: newly addressed device (in ADDRESS state) |
399 |
+ * |
400 |
+- * This is only called by usb_new_device() and usb_authorize_device() |
401 |
+- * and FIXME -- all comments that apply to them apply here wrt to |
402 |
+- * environment. |
403 |
++ * This is only called by usb_new_device() -- all comments that apply there |
404 |
++ * apply here wrt to environment. |
405 |
+ * |
406 |
+ * If the device is WUSB and not authorized, we don't attempt to read |
407 |
+ * the string descriptors, as they will be errored out by the device |
408 |
+diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c |
409 |
+index 8217032dfb85f..b63f78e48c74e 100644 |
410 |
+--- a/drivers/usb/core/sysfs.c |
411 |
++++ b/drivers/usb/core/sysfs.c |
412 |
+@@ -869,11 +869,7 @@ read_descriptors(struct file *filp, struct kobject *kobj, |
413 |
+ size_t srclen, n; |
414 |
+ int cfgno; |
415 |
+ void *src; |
416 |
+- int retval; |
417 |
+ |
418 |
+- retval = usb_lock_device_interruptible(udev); |
419 |
+- if (retval < 0) |
420 |
+- return -EINTR; |
421 |
+ /* The binary attribute begins with the device descriptor. |
422 |
+ * Following that are the raw descriptor entries for all the |
423 |
+ * configurations (config plus subsidiary descriptors). |
424 |
+@@ -898,7 +894,6 @@ read_descriptors(struct file *filp, struct kobject *kobj, |
425 |
+ off -= srclen; |
426 |
+ } |
427 |
+ } |
428 |
+- usb_unlock_device(udev); |
429 |
+ return count - nleft; |
430 |
+ } |
431 |
+ |
432 |
+diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c |
433 |
+index 89c9ab2b19f85..a23ddbb819795 100644 |
434 |
+--- a/drivers/usb/dwc3/dwc3-pci.c |
435 |
++++ b/drivers/usb/dwc3/dwc3-pci.c |
436 |
+@@ -47,6 +47,7 @@ |
437 |
+ #define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1 |
438 |
+ #define PCI_DEVICE_ID_INTEL_RPL 0xa70e |
439 |
+ #define PCI_DEVICE_ID_INTEL_RPLS 0x7a61 |
440 |
++#define PCI_DEVICE_ID_INTEL_MTLM 0x7eb1 |
441 |
+ #define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1 |
442 |
+ #define PCI_DEVICE_ID_INTEL_MTL 0x7e7e |
443 |
+ #define PCI_DEVICE_ID_INTEL_TGL 0x9a15 |
444 |
+@@ -467,6 +468,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = { |
445 |
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS), |
446 |
+ (kernel_ulong_t) &dwc3_pci_intel_swnode, }, |
447 |
+ |
448 |
++ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLM), |
449 |
++ (kernel_ulong_t) &dwc3_pci_intel_swnode, }, |
450 |
++ |
451 |
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP), |
452 |
+ (kernel_ulong_t) &dwc3_pci_intel_swnode, }, |
453 |
+ |
454 |
+diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c |
455 |
+index 840626e064e13..a0ca47fbff0fc 100644 |
456 |
+--- a/drivers/usb/gadget/function/u_serial.c |
457 |
++++ b/drivers/usb/gadget/function/u_serial.c |
458 |
+@@ -82,6 +82,9 @@ |
459 |
+ #define WRITE_BUF_SIZE 8192 /* TX only */ |
460 |
+ #define GS_CONSOLE_BUF_SIZE 8192 |
461 |
+ |
462 |
++/* Prevents race conditions while accessing gser->ioport */ |
463 |
++static DEFINE_SPINLOCK(serial_port_lock); |
464 |
++ |
465 |
+ /* console info */ |
466 |
+ struct gs_console { |
467 |
+ struct console console; |
468 |
+@@ -1375,8 +1378,10 @@ void gserial_disconnect(struct gserial *gser) |
469 |
+ if (!port) |
470 |
+ return; |
471 |
+ |
472 |
++ spin_lock_irqsave(&serial_port_lock, flags); |
473 |
++ |
474 |
+ /* tell the TTY glue not to do I/O here any more */ |
475 |
+- spin_lock_irqsave(&port->port_lock, flags); |
476 |
++ spin_lock(&port->port_lock); |
477 |
+ |
478 |
+ gs_console_disconnect(port); |
479 |
+ |
480 |
+@@ -1391,7 +1396,8 @@ void gserial_disconnect(struct gserial *gser) |
481 |
+ tty_hangup(port->port.tty); |
482 |
+ } |
483 |
+ port->suspended = false; |
484 |
+- spin_unlock_irqrestore(&port->port_lock, flags); |
485 |
++ spin_unlock(&port->port_lock); |
486 |
++ spin_unlock_irqrestore(&serial_port_lock, flags); |
487 |
+ |
488 |
+ /* disable endpoints, aborting down any active I/O */ |
489 |
+ usb_ep_disable(gser->out); |
490 |
+@@ -1425,10 +1431,19 @@ EXPORT_SYMBOL_GPL(gserial_suspend); |
491 |
+ |
492 |
+ void gserial_resume(struct gserial *gser) |
493 |
+ { |
494 |
+- struct gs_port *port = gser->ioport; |
495 |
++ struct gs_port *port; |
496 |
+ unsigned long flags; |
497 |
+ |
498 |
+- spin_lock_irqsave(&port->port_lock, flags); |
499 |
++ spin_lock_irqsave(&serial_port_lock, flags); |
500 |
++ port = gser->ioport; |
501 |
++ |
502 |
++ if (!port) { |
503 |
++ spin_unlock_irqrestore(&serial_port_lock, flags); |
504 |
++ return; |
505 |
++ } |
506 |
++ |
507 |
++ spin_lock(&port->port_lock); |
508 |
++ spin_unlock(&serial_port_lock); |
509 |
+ port->suspended = false; |
510 |
+ if (!port->start_delayed) { |
511 |
+ spin_unlock_irqrestore(&port->port_lock, flags); |
512 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
513 |
+index ee5ac4ef7e162..e6d8d9b35ad0e 100644 |
514 |
+--- a/drivers/usb/serial/option.c |
515 |
++++ b/drivers/usb/serial/option.c |
516 |
+@@ -402,6 +402,8 @@ static void option_instat_callback(struct urb *urb); |
517 |
+ #define LONGCHEER_VENDOR_ID 0x1c9e |
518 |
+ |
519 |
+ /* 4G Systems products */ |
520 |
++/* This one was sold as the VW and Skoda "Carstick LTE" */ |
521 |
++#define FOUR_G_SYSTEMS_PRODUCT_CARSTICK_LTE 0x7605 |
522 |
+ /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * |
523 |
+ * It seems to contain a Qualcomm QSC6240/6290 chipset */ |
524 |
+ #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 |
525 |
+@@ -1976,6 +1978,8 @@ static const struct usb_device_id option_ids[] = { |
526 |
+ .driver_info = RSVD(2) }, |
527 |
+ { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, |
528 |
+ { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, |
529 |
++ { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_CARSTICK_LTE), |
530 |
++ .driver_info = RSVD(0) }, |
531 |
+ { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), |
532 |
+ .driver_info = NCTRL(0) | NCTRL(1) }, |
533 |
+ { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100), |
534 |
+diff --git a/drivers/usb/typec/pd.c b/drivers/usb/typec/pd.c |
535 |
+index dc72005d68db9..b5ab26422c349 100644 |
536 |
+--- a/drivers/usb/typec/pd.c |
537 |
++++ b/drivers/usb/typec/pd.c |
538 |
+@@ -161,7 +161,6 @@ static struct device_type source_fixed_supply_type = { |
539 |
+ |
540 |
+ static struct attribute *sink_fixed_supply_attrs[] = { |
541 |
+ &dev_attr_dual_role_power.attr, |
542 |
+- &dev_attr_usb_suspend_supported.attr, |
543 |
+ &dev_attr_unconstrained_power.attr, |
544 |
+ &dev_attr_usb_communication_capable.attr, |
545 |
+ &dev_attr_dual_role_data.attr, |
546 |
+diff --git a/net/core/filter.c b/net/core/filter.c |
547 |
+index 43cc1fe58a2c6..a00a4b5476d45 100644 |
548 |
+--- a/net/core/filter.c |
549 |
++++ b/net/core/filter.c |
550 |
+@@ -5816,7 +5816,7 @@ static int bpf_ipv4_fib_lookup(struct net *net, struct bpf_fib_lookup *params, |
551 |
+ neigh = __ipv6_neigh_lookup_noref_stub(dev, dst); |
552 |
+ } |
553 |
+ |
554 |
+- if (!neigh) |
555 |
++ if (!neigh || !(neigh->nud_state & NUD_VALID)) |
556 |
+ return BPF_FIB_LKUP_RET_NO_NEIGH; |
557 |
+ |
558 |
+ return bpf_fib_set_fwd_params(params, neigh, dev, mtu); |
559 |
+@@ -5931,7 +5931,7 @@ static int bpf_ipv6_fib_lookup(struct net *net, struct bpf_fib_lookup *params, |
560 |
+ * not needed here. |
561 |
+ */ |
562 |
+ neigh = __ipv6_neigh_lookup_noref_stub(dev, dst); |
563 |
+- if (!neigh) |
564 |
++ if (!neigh || !(neigh->nud_state & NUD_VALID)) |
565 |
+ return BPF_FIB_LKUP_RET_NO_NEIGH; |
566 |
+ |
567 |
+ return bpf_fib_set_fwd_params(params, neigh, dev, mtu); |
568 |
+diff --git a/scripts/tags.sh b/scripts/tags.sh |
569 |
+index e137cf15aae9d..0d045182c08c0 100755 |
570 |
+--- a/scripts/tags.sh |
571 |
++++ b/scripts/tags.sh |
572 |
+@@ -91,7 +91,7 @@ all_compiled_sources() |
573 |
+ { |
574 |
+ echo include/generated/autoconf.h |
575 |
+ find $ignore -name "*.cmd" -exec \ |
576 |
+- grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | |
577 |
++ sed -n -E 's/^source_.* (.*)/\1/p; s/^ (\S.*) \\/\1/p' {} \+ | |
578 |
+ awk '!a[$0]++' |
579 |
+ } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | |
580 |
+ sort -u |
581 |
+diff --git a/sound/pci/hda/hda_cs_dsp_ctl.c b/sound/pci/hda/hda_cs_dsp_ctl.c |
582 |
+index 5433f6227ac9f..463ca06036bfe 100644 |
583 |
+--- a/sound/pci/hda/hda_cs_dsp_ctl.c |
584 |
++++ b/sound/pci/hda/hda_cs_dsp_ctl.c |
585 |
+@@ -218,10 +218,10 @@ int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type, |
586 |
+ cs_ctl = cs_dsp_get_ctl(dsp, name, type, alg); |
587 |
+ ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, buf, len); |
588 |
+ mutex_unlock(&dsp->pwr_lock); |
589 |
+- if (ret) |
590 |
++ if (ret < 0) |
591 |
+ return ret; |
592 |
+ |
593 |
+- if (cs_ctl->flags & WMFW_CTL_FLAG_SYS) |
594 |
++ if (ret == 0 || (cs_ctl->flags & WMFW_CTL_FLAG_SYS)) |
595 |
+ return 0; |
596 |
+ |
597 |
+ ctl = cs_ctl->priv; |